\seekquarry\yioop\controllers\componentsAccountaccessComponent

Component of the Yioop control panel used to handle activitys for managing accounts, users, roles, and groups. i.e., Settings of users and groups, what roles and groups a user has, what roles and users a group has, and what activities make up a role. It is used by AdminController

Summary

Methods
Properties
Constants
__construct()
initializeWikiEditor()
manageAccount()
makeRecoveryQuestions()
manageUsers()
getUserRolesData()
getUserGroupsData()
manageRoles()
$parent
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$parent

$parent : object

Reference to the controller this component lives on

Type

object

Methods

__construct()

__construct(object  $parent_controller) 

Sets up this component by storing in its parent field a reference to controller this component lives on

Parameters

object $parent_controller

reference to the controller this component lives on

initializeWikiEditor()

initializeWikiEditor(\seekquarry\yioop\controllers\components\array&  $data,   $id = "") 

Called to include the Javascript Wiki Editor (wiki.js) on a page and to send any localizations needed from PHP to Javascript-land It is used by both Crawl and SocialComponent

Parameters

\seekquarry\yioop\controllers\components\array& $data

an asscoiative array of data to be used by the view and layout that the wiki editor will be drawn on This method tacks on to INCLUDE_SCRIPTS to make the layout load wiki.js.

$id

if "" then all textareas on page will get editor buttons, if -1 then sets up translations, but does not add any button, otherwise, add buttons to textarea $id will. (Can call this method multiple times, if want more than one but not all)

manageAccount()

manageAccount() : array

Used to handle the change current user password admin activity

Returns

array —

$data SCRIPT field contains success or failure message

makeRecoveryQuestions()

makeRecoveryQuestions() : array

Creates an array of recovery questions and possible answers for a user to select their answers to. This list is chosen from a larger list of questions translated from strings appearing in @see RegisterView

Returns

array —

questions and answers

manageUsers()

manageUsers() : array

Used to handle the manage user activity.

This activity allows new users to be added, old users to be deleted and allows roles to be added to/deleted from a user

Returns

array —

$data infomation about users of the system, roles, etc. as well as status messages on performing a given sub activity

getUserRolesData()

getUserRolesData(\seekquarry\yioop\controllers\components\array&  $data, integer  $user_id) 

Uses $_REQUEST and $user_id to look up all the roles that a user has subject to $_REQUEST['role_limit'], $_REQUEST['role_filter'], and $_REQUEST['role_sorts']. Information about these roles is added as fields to $data[NUM_USER_ROLES'] and $data['USER_ROLES']

Parameters

\seekquarry\yioop\controllers\components\array& $data

data for the manageUsers view.

integer $user_id

user to look up roles for

getUserGroupsData()

getUserGroupsData(\seekquarry\yioop\controllers\components\array&  $data, integer  $user_id) 

Uses $_REQUEST and $user_id to look up all the groups that a user belongs to subject to $_REQUEST['group_limit'], $_REQUEST['group_filter'], and $_REQUEST['group_sorts']. Information about these roles is added as fields to $data[NUM_USER_GROUPS'] and $data['USER_GROUPS']

Parameters

\seekquarry\yioop\controllers\components\array& $data

data for the manageUsers view.

integer $user_id

user to look up roles for

manageRoles()

manageRoles() : array

Used to handle the manage role activity.

This activity allows new roles to be added, old roles to be deleted and allows activities to be added to/deleted from a role

Returns

array —

$data information about roles in the system, activities, etc. as well as status messages on performing a given sub activity