Public Member Functions | |
JUgrSystem () | |
RefreshAll () | |
& | GetInstance () |
_UpdateSession () | |
_RefreshUsers () | |
& | GetUser ($id, $refresh=false, $cached=false) |
& | GetAllUsers () |
& | AddUser ($login, $pass, $globalgroup, $globalrole) |
RemoveUser ($idU) | |
_RefreshGroups () | |
& | GetGroup ($idG, $refresh=false) |
& | _AccessGroup ($idG, $refresh=false) |
& | GetAllGroups ($refresh=false) |
& | GetGroups ($parent=0, $global=null) |
& | AddGroup ($name, $global, $parent) |
RemoveGroup ($idG) | |
_RefreshRoles () | |
& | GetRole ($idR, $refresh=false) |
& | _AccessRole ($idR, $refresh=false) |
& | GetAllRoles ($refresh=false) |
& | AddRole ($name) |
RemoveRole ($idR) | |
Public Attributes | |
$users | |
A few users in the system. | |
$userslogin | |
The login of the system users. | |
$groups | |
All groups in the system. | |
$roles | |
All roles in the system. |
This class also deals with all the stuff about users, groups and roles that are stored in the session. The way it works is that an instance of it is stored in the session and modules access to it through a GetInstance static method that returns the object in session or, if it does not exist, it contructs a new one with the current active user in the system, stores it in session and returns it.
Definition at line 33 of file JUgrSystem.class.php.
|
The constructor. It constructs a new JUgrSystem with information stored about the active user in the system. This constructor is not intended to be run directly but through the GetInstance statice method. Definition at line 49 of file JUgrSystem.class.php. Referenced by GetInstance(). |
|
Gets the Group object of a group given its id.
Definition at line 276 of file JUgrSystem.class.php. References JBaseObject::RaiseError(). |
|
Gets the Role object of a role given its id.
Definition at line 419 of file JUgrSystem.class.php. References JBaseObject::RaiseError(). |
|
Refreshs the information about groups. Definition at line 226 of file JUgrSystem.class.php. References Group::GetAllGroupsId(). |
|
Refreshes the information about roles. Definition at line 369 of file JUgrSystem.class.php. References Role::GetAllRolesId(). |
|
Refreshs the information about users. Definition at line 111 of file JUgrSystem.class.php. |
|
Re-stores the object in the session. Definition at line 103 of file JUgrSystem.class.php. References JSession::SetVar(). Referenced by GetInstance(). |
|
Adds a new group in the system.
Definition at line 336 of file JUgrSystem.class.php. References Group::Create(), JSystem::GetLastError(), JSystem::IsError(), and JBaseObject::RaiseError(). |
|
Adds a new role in the system.
Definition at line 453 of file JUgrSystem.class.php. References Role::Create(). |
|
Adds a new user in the DB.
Definition at line 205 of file JUgrSystem.class.php. References User::Create(). |
|
Gets all groups in the system.
Definition at line 298 of file JUgrSystem.class.php. |
|
Gets all roles in the system.
Definition at line 441 of file JUgrSystem.class.php. |
|
Gets a DBJames object with all users in the system.
Definition at line 192 of file JUgrSystem.class.php. References User::GetAllUsersId(). |
|
Gets the Group object of a group given its id. It just takes it from the information in the session.
Definition at line 248 of file JUgrSystem.class.php. References JSystem::IsError(), and JBaseObject::RaiseError(). |
|
Gets the groups that verifies a certain condition
Definition at line 313 of file JUgrSystem.class.php. References Group::GetAllGroupsId(). |
|
Static method that returns the JUgrSystem object stored in session. If there isn't any, it will construct a new one with the current active user in the system.
Definition at line 71 of file JUgrSystem.class.php. References _UpdateSession(), JSession::ExistsVar(), JSession::GetVar(), JUgrSystem(), and JSession::SetVar(). Referenced by User::AddToGroup(), Group::AddUser(), JSystem::AnonLogin(), DefaultAuth::Authenticate(), User::Create(), Group::Create(), JSystem::GetCurrentGroup(), JSystem::GetCurrentUser(), User::GetGlobalGroup(), User::GetGlobalRole(), User::GetGroups(), Group::GetParent(), User::GetRole(), User::GetRoles(), Group::GetSubgroups(), Group::GetSubgroupsOfUser(), JSystem::InitModule(), JSystem::LoadModuleGlobalGroup(), JSystem::LoadModuleGroup(), JSystem::Login(), HtmlCoreForms::PrintComboRoles(), User::Remove(), Group::Remove(), User::RemoveFromGroup(), and User::SetRole(). |
|
Gets the Role object of a role given its id. It just takes it from the information in the session.
Definition at line 391 of file JUgrSystem.class.php. References JSystem::IsError(), and JBaseObject::RaiseError(). |
|
Gets the User object of an user given its id. This method won't store anything about the user in the session, so, next time you want to get it, it will access the DB again.
Definition at line 131 of file JUgrSystem.class.php. References JSystem::GetLastError(), JSystem::IsError(), and JBaseObject::RaiseError(). |
|
Refreshes the information about users, groups and roles Definition at line 58 of file JUgrSystem.class.php. |
|
Removes a group from the system.
Definition at line 353 of file JUgrSystem.class.php. References JSystem::IsError(), and Group::Remove(). |
|
Removes a role from the system.
Definition at line 467 of file JUgrSystem.class.php. References JSystem::IsError(), and Role::Remove(). |
|
Removes an user from the DB.
Definition at line 217 of file JUgrSystem.class.php. References User::Remove(). |
|
All groups in the system.
Definition at line 37 of file JUgrSystem.class.php. |
|
All roles in the system.
Definition at line 38 of file JUgrSystem.class.php. |
|
A few users in the system.
Definition at line 35 of file JUgrSystem.class.php. |
|
The login of the system users.
Definition at line 36 of file JUgrSystem.class.php. |