Yioop_V9.5_Source_Code_Documentation

AccountaccessComponent extends Component
in package

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

Tags
author

Chris Pollett

Table of Contents

$parent  : object
Reference to the controller this component lives on
__construct()  : mixed
Sets up this component by storing in its parent field a reference to controller this component lives on
getUserGroupsData()  : mixed
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']
getUserRolesData()  : mixed
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']
initCrawlBadges()  : mixed
Used to compute statistics for badges related for the manage crawls, mix crawls, and manage machine buttons shown typically to admin accounts
initializeWikiEditor()  : mixed
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
initSocialBadges()  : mixed
Used to compute the impression statistics for badges on the social controls button for $user_id. These badges display the number of unread messages, the number of unread group post and the number of groups the user belongs to
makeRecoveryQuestions()  : array<string|int, mixed>
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
manageAccount()  : array<string|int, mixed>
Used to handle the change current user password admin activity
manageRoles()  : array<string|int, mixed>
Used to handle the manage role activity.
manageUsers()  : array<string|int, mixed>
Used to handle the manage user activity.

Properties

$parent

Reference to the controller this component lives on

public object $parent = null

Methods

__construct()

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

public __construct(object $parent_controller) : mixed
Parameters
$parent_controller : object

reference to the controller this component lives on

Return values
mixed

getUserGroupsData()

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']

public getUserGroupsData(array<string|int, mixed> &$data, int $user_id) : mixed
Parameters
$data : array<string|int, mixed>

data for the manageUsers view.

$user_id : int

user to look up roles for

Return values
mixed

getUserRolesData()

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']

public getUserRolesData(array<string|int, mixed> &$data, int $user_id) : mixed
Parameters
$data : array<string|int, mixed>

data for the manageUsers view.

$user_id : int

user to look up roles for

Return values
mixed

initCrawlBadges()

Used to compute statistics for badges related for the manage crawls, mix crawls, and manage machine buttons shown typically to admin accounts

public initCrawlBadges(int $user_id, array<string|int, mixed> &$data) : mixed
Parameters
$user_id : int

of user - used to determin the mix crawl list

$data : array<string|int, mixed>

associative array of data to send to the view. This method adds three new field NUM_MIXES, CRAWL_MANAGER, "NUM_MACHINES, CRAWLS_RUNNING, and NUM_CLOSED_CRAWLS

Return values
mixed

initializeWikiEditor()

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

public initializeWikiEditor(array<string|int, mixed> &$data[,  $id = "" ]) : mixed
Parameters
$data : array<string|int, mixed>

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)

Return values
mixed

initSocialBadges()

Used to compute the impression statistics for badges on the social controls button for $user_id. These badges display the number of unread messages, the number of unread group post and the number of groups the user belongs to

public initSocialBadges(int $user_id, array<string|int, mixed> &$data) : mixed
Parameters
$user_id : int

id of user to compute statistics for

$data : array<string|int, mixed>

associative array of data to send to the view. This method adds three new field NUM_GROUPS, UNREAD_POSTS, and UNREAD_MESSAGES

Return values
mixed

makeRecoveryQuestions()

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

public makeRecoveryQuestions() : array<string|int, mixed>
Return values
array<string|int, mixed>

questions and answers

manageAccount()

Used to handle the change current user password admin activity

public manageAccount() : array<string|int, mixed>
Return values
array<string|int, mixed>

$data SCRIPT field contains success or failure message

manageRoles()

Used to handle the manage role activity.

public manageRoles() : array<string|int, mixed>

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

Return values
array<string|int, mixed>

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

manageUsers()

Used to handle the manage user activity.

public manageUsers() : array<string|int, mixed>

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

Return values
array<string|int, mixed>

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


        

Search results