Class: I2CE UserAccess DHIS (Development): Difference between revisions

From IHRIS Wiki
(Created page with '{{otherversions|Class: I2CE_UserAccess_DHIS}} This article describes the class ''I2CE_UserAccess_DHIS'' . *Extends the class: [[Class: I2CE_UserAccess_Mechanism (Development) | I…')
 
No edit summary
 
Line 2: Line 2:
This article describes the class ''I2CE_UserAccess_DHIS'' .
This article describes the class ''I2CE_UserAccess_DHIS'' .
*Extends the class: [[Class: I2CE_UserAccess_Mechanism (Development) | I2CE_UserAccess_Mechanism]].
*Extends the class: [[Class: I2CE_UserAccess_Mechanism (Development) | I2CE_UserAccess_Mechanism]].
*Location: Part of the module [[I2CE Module List (Development)#UserAccess_DHIS|UserAccess_DHIS]] in the package [https://launchpad.net/i2ce I2CE] 4.0-dev
*Location: Part of the module [[I2CE Module List (Development)#UserAccess_DHIS|UserAccess_DHIS]] in the package [https://launchpad.net/i2ce I2CE] 4.1-dev
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L34 modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 34
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L34 modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 34
*Author: Carl Leitner <litlfred@ibiblio.org>
*Author: Carl Leitner <litlfred@ibiblio.org>
*Since: v4.0.3
*Since: v4.0.3
Line 10: Line 10:
===$detailTable===
===$detailTable===
@var protected string $userTable the user detail table.
@var protected string $userTable the user detail table.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L136 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 136
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L136 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 136
*Type: protected $detailTable
*Type: protected $detailTable


===$passTable===
===$passTable===
the user password table.
the user password table.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L141 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 141
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L141 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 141
*Type: protected [http://www.php.net/manual/en/language.types.string.php string ] $passTable
*Type: protected [http://www.php.net/manual/en/language.types.string.php string ] $passTable


===$accessTable===
===$accessTable===
the user access table.
the user access table.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L146 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 146
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L146 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 146
*Type: protected [http://www.php.net/manual/en/language.types.string.php string ] $accessTable
*Type: protected [http://www.php.net/manual/en/language.types.string.php string ] $accessTable


===$logTable===
===$logTable===
the user acitivity log table.
the user acitivity log table.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L153 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 153
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L153 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 153
*Type: protected [http://www.php.net/manual/en/language.types.string.php string ] $logTable
*Type: protected [http://www.php.net/manual/en/language.types.string.php string ] $logTable


Line 31: Line 31:
===__construct()===
===__construct()===
Create a new instance of a dhis user access mechanism
Create a new instance of a dhis user access mechanism
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L124 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 124
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L124 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 124
*Signature: public function __construct()
*Signature: public function __construct()
===_changePassword()===
===_changePassword()===
Change the password for this user. Worker method This will update a user's record to change the password in the database.  It checks to make sure the new password matches the confirmation.
Change the password for this user. Worker method This will update a user's record to change the password in the database.  It checks to make sure the new password matches the confirmation.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L387 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 387
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L413 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 413
*Signature: public function _changePassword($username,$old_password,$new_password)
*Signature: public function _changePassword($username,$old_password,$new_password)
*Parameters:
*Parameters:
Line 44: Line 44:
===_createUser()===
===_createUser()===
Create user worker method
Create user worker method
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L465 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 465
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L491 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 491
*Signature: public function _createUser($username,$password,$role,$details)
*Signature: public function _createUser($username,$password,$role,$details)
*Parameters:
*Parameters:
Line 56: Line 56:
===_getUserId()===
===_getUserId()===
Gets the user id from the user name
Gets the user id from the user name
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L340 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 340
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L340 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 340
*Signature: public function _getUserId($username)
*Signature: public function _getUserId($username)
*Parameters:
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $username
** [http://www.php.net/manual/en/language.types.string.php string ] $username
*Returns: [http://www.php.net/manual/en/language.types.integer.php int ]<br/>or false on failure
*Returns: [http://www.php.net/manual/en/language.types.integer.php int ]<br/>or false on failure
===_getUserIds()===
Gets the user ids
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L358 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 358
*Signature: public function _getUserIds()
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]<br/>of ids
===_getUserInfo()===
===_getUserInfo()===
Gets the indicated user details as well the  role
Gets the indicated user details as well the  role
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L213 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 213
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L213 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 213
*Signature: public function _getUserInfo($username,$getRole,$details)
*Signature: public function _getUserInfo($username,$getRole,$details)
*Parameters:
*Parameters:
Line 74: Line 79:
===_getUserNameFromId()===
===_getUserNameFromId()===
Gets the user id from the username
Gets the user id from the username
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L361 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 361
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L387 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 387
*Signature: public function _getUserNameFromId($userid)
*Signature: public function _getUserNameFromId($userid)
*Parameters:
*Parameters:
Line 81: Line 86:
===_getUsersByInfo()===
===_getUsersByInfo()===
Gets the userss by the indicated  details as well as the  role. worker method @oaram boolean $role Defaults to false
Gets the userss by the indicated  details as well as the  role. worker method @oaram boolean $role Defaults to false
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L257 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 257
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L257 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 257
*Signature: public function _getUsersByInfo($role,$details)
*Signature: public function _getUsersByInfo($role,$details)
*Parameters:
*Parameters:
Line 91: Line 96:
===_setUserInfo()===
===_setUserInfo()===
Gets the role assigned to a user
Gets the role assigned to a user
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L167 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 167
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L167 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 167
*Signature: public function _setUserInfo($username,$setRole,$details)
*Signature: public function _setUserInfo($username,$setRole,$details)
*Parameters:
*Parameters:
Line 102: Line 107:
===_userExists()===
===_userExists()===
See if a user is in the system
See if a user is in the system
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L316 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 316
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L316 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 316
*Signature: public function _userExists($username,$has_role)
*Signature: public function _userExists($username,$has_role)
*Parameters:
*Parameters:
Line 110: Line 115:
===_userHasPassword()===
===_userHasPassword()===
verifies that the specified user has the specified password
verifies that the specified user has the specified password
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L417 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 417
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L443 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 443
*Signature: public function _userHasPassword($username,$password)
*Signature: public function _userHasPassword($username,$password)
*Parameters:
*Parameters:
Line 118: Line 123:
===canChangePassword()===
===canChangePassword()===
Whether or not this acccess mechansim can change a user's password
Whether or not this acccess mechansim can change a user's password
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L304 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 304
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L304 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 304
*Signature: public function canChangePassword()
*Signature: public function canChangePassword()
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
===canCreateNewUser()===
===canCreateNewUser()===
Whether or not this acccess mechansim can create ne users
Whether or not this acccess mechansim can create ne users
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L57 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 57
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L57 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 57
*Signature: public function canCreateNewUser()
*Signature: public function canCreateNewUser()
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
===canEditUserDetails()===
===canEditUserDetails()===
Whether or not this acccess mechansim can create edit details of existing users
Whether or not this acccess mechansim can create edit details of existing users
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L65 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 65
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L65 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 65
*Signature: public function canEditUserDetails()
*Signature: public function canEditUserDetails()
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
===displayName()===
===displayName()===
Gets the display name for the user
Gets the display name for the user
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L481 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 481
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L507 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 507
*Signature: public function displayName($username,$user)
*Signature: public function displayName($username,$user)
*Parameters:
*Parameters:
Line 141: Line 146:
===encryptPassword()===
===encryptPassword()===
Encrypts the password
Encrypts the password
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L42 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 42
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L42 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 42
*Signature: protected function encryptPassword($passwd)
*Signature: protected function encryptPassword($passwd)
*Parameters:
*Parameters:
Line 148: Line 153:
===ensureDefaultOptions()===
===ensureDefaultOptions()===
ensrure default options are set
ensrure default options are set
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L116 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 116
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L116 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 116
*Signature: public function ensureDefaultOptions($options)
*Signature: public function ensureDefaultOptions($options)
*Parameters:
*Parameters:
Line 155: Line 160:
===getAllowedDetails()===
===getAllowedDetails()===
Gets an array of the allowed details
Gets an array of the allowed details
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L75 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 75
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L75 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 75
*Signature: public function getAllowedDetails()
*Signature: public function getAllowedDetails()
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
===getDetailColumnTypes()===
===getDetailColumnTypes()===
An array of the details and their associated mdb2 types
An array of the details and their associated mdb2 types
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L99 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 99
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L99 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 99
*Signature: protected function getDetailColumnTypes()
*Signature: protected function getDetailColumnTypes()
===getDetailColumns()===
===getDetailColumns()===
An array of the details and their associated columns
An array of the details and their associated columns
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L85 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 85
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L85 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 85
*Signature: protected function getDetailColumns()
*Signature: protected function getDetailColumns()
===logActivity()===
===logActivity()===
Logs a user activiity @param string $actitivty, such as login, logout, access.  Default is access @param int $timesamp. Defaults to null, in which case it should be now
Logs a user activiity @param string $actitivty, such as login, logout, access.  Default is access @param int $timesamp. Defaults to null, in which case it should be now
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L438 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 438
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php#L464 i2ce/modules/User/modules/UserAccess_DHIS/lib/I2CE_UserAccess_DHIS.php] on line 464
*Signature: public function logActivity($username,$activity,$timestamp)
*Signature: public function logActivity($username,$activity,$timestamp)
*Parameters:
*Parameters:
Line 177: Line 182:
***Default Value: null
***Default Value: null
==Inherited Methods==
==Inherited Methods==
===_userHasDefaultPassword()===
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#_userHasDefaultPassword() | I2CE_UserAccess_Mechanism->_userHasDefaultPassword()]]
===changePassword()===
===changePassword()===
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#changePassword() | I2CE_UserAccess_Mechanism->changePassword()]]
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#changePassword() | I2CE_UserAccess_Mechanism->changePassword()]]
Line 182: Line 190:
===createUser()===
===createUser()===
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#createUser() | I2CE_UserAccess_Mechanism->createUser()]]
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#createUser() | I2CE_UserAccess_Mechanism->createUser()]]
===doAutoLogin()===
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#doAutoLogin() | I2CE_UserAccess_Mechanism->doAutoLogin()]]


===generatePassword()===
===generatePassword()===
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#generatePassword() | I2CE_UserAccess_Mechanism->generatePassword()]]
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#generatePassword() | I2CE_UserAccess_Mechanism->generatePassword()]]
===getAutoLoginUser()===
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#getAutoLoginUser() | I2CE_UserAccess_Mechanism->getAutoLoginUser()]]


===getDetailName()===
===getDetailName()===
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#getDetailName() | I2CE_UserAccess_Mechanism->getDetailName()]]
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#getDetailName() | I2CE_UserAccess_Mechanism->getDetailName()]]
===getSessionActivity()===
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#getSessionActivity() | I2CE_UserAccess_Mechanism->getSessionActivity()]]


===getSessionDetails()===
===getSessionDetails()===
Line 203: Line 220:
===getUserId()===
===getUserId()===
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#getUserId() | I2CE_UserAccess_Mechanism->getUserId()]]
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#getUserId() | I2CE_UserAccess_Mechanism->getUserId()]]
===getUserIds()===
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#getUserIds() | I2CE_UserAccess_Mechanism->getUserIds()]]


===getUserInfo()===
===getUserInfo()===
Line 212: Line 232:
===getUsersByInfo()===
===getUsersByInfo()===
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#getUsersByInfo() | I2CE_UserAccess_Mechanism->getUsersByInfo()]]
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#getUsersByInfo() | I2CE_UserAccess_Mechanism->getUsersByInfo()]]
===hasBeenLoggedOut()===
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#hasBeenLoggedOut() | I2CE_UserAccess_Mechanism->hasBeenLoggedOut()]]


===hasSession()===
===hasSession()===
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#hasSession() | I2CE_UserAccess_Mechanism->hasSession()]]
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#hasSession() | I2CE_UserAccess_Mechanism->hasSession()]]
===isLoggingFromAnotherIP()===
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#isLoggingFromAnotherIP() | I2CE_UserAccess_Mechanism->isLoggingFromAnotherIP()]]


===isRequired()===
===isRequired()===
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#isRequired() | I2CE_UserAccess_Mechanism->isRequired()]]
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#isRequired() | I2CE_UserAccess_Mechanism->isRequired()]]
===logOutPreviousSessions()===
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#logOutPreviousSessions() | I2CE_UserAccess_Mechanism->logOutPreviousSessions()]]


===setSession()===
===setSession()===
Line 227: Line 256:
===unsetSession()===
===unsetSession()===
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#unsetSession() | I2CE_UserAccess_Mechanism->unsetSession()]]
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#unsetSession() | I2CE_UserAccess_Mechanism->unsetSession()]]
===updateSessionActivity()===
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#updateSessionActivity() | I2CE_UserAccess_Mechanism->updateSessionActivity()]]


===userExists()===
===userExists()===
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#userExists() | I2CE_UserAccess_Mechanism->userExists()]]
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#userExists() | I2CE_UserAccess_Mechanism->userExists()]]
===userHasDefaultPassword()===
This public method is inherited from [[Class: I2CE_UserAccess_Mechanism (Development)#userHasDefaultPassword() | I2CE_UserAccess_Mechanism->userHasDefaultPassword()]]


===userHasPassword()===
===userHasPassword()===

Latest revision as of 08:20, 6 May 2015


This article describes the class I2CE_UserAccess_DHIS .

@filesource Class I2CE_UserAccess_Internal A user access control mechansim where username and the user details are stored in one table and access is in another table and the tables are joined on a userid.

Variables

$detailTable

@var protected string $userTable the user detail table.

$passTable

the user password table.

$accessTable

the user access table.

$logTable

the user acitivity log table.

Methods

__construct()

Create a new instance of a dhis user access mechanism

_changePassword()

Change the password for this user. Worker method This will update a user's record to change the password in the database. It checks to make sure the new password matches the confirmation.

_createUser()

Create user worker method

_getUserId()

Gets the user id from the user name

_getUserIds()

Gets the user ids

_getUserInfo()

Gets the indicated user details as well the role

_getUserNameFromId()

Gets the user id from the username

_getUsersByInfo()

Gets the userss by the indicated details as well as the role. worker method @oaram boolean $role Defaults to false

_setUserInfo()

Gets the role assigned to a user

_userExists()

See if a user is in the system

_userHasPassword()

verifies that the specified user has the specified password

canChangePassword()

Whether or not this acccess mechansim can change a user's password

canCreateNewUser()

Whether or not this acccess mechansim can create ne users

canEditUserDetails()

Whether or not this acccess mechansim can create edit details of existing users

displayName()

Gets the display name for the user

encryptPassword()

Encrypts the password

ensureDefaultOptions()

ensrure default options are set

getAllowedDetails()

Gets an array of the allowed details

getDetailColumnTypes()

An array of the details and their associated mdb2 types

getDetailColumns()

An array of the details and their associated columns

logActivity()

Logs a user activiity @param string $actitivty, such as login, logout, access. Default is access @param int $timesamp. Defaults to null, in which case it should be now

Inherited Methods

_userHasDefaultPassword()

This public method is inherited from I2CE_UserAccess_Mechanism->_userHasDefaultPassword()

changePassword()

This public method is inherited from I2CE_UserAccess_Mechanism->changePassword()

createUser()

This public method is inherited from I2CE_UserAccess_Mechanism->createUser()

doAutoLogin()

This public method is inherited from I2CE_UserAccess_Mechanism->doAutoLogin()

generatePassword()

This public method is inherited from I2CE_UserAccess_Mechanism->generatePassword()

getAutoLoginUser()

This public method is inherited from I2CE_UserAccess_Mechanism->getAutoLoginUser()

getDetailName()

This public method is inherited from I2CE_UserAccess_Mechanism->getDetailName()

getSessionActivity()

This public method is inherited from I2CE_UserAccess_Mechanism->getSessionActivity()

getSessionDetails()

This public method is inherited from I2CE_UserAccess_Mechanism->getSessionDetails()

getSessionID()

This public method is inherited from I2CE_UserAccess_Mechanism->getSessionID()

getSessionRole()

This public method is inherited from I2CE_UserAccess_Mechanism->getSessionRole()

getSessionUserName()

This public method is inherited from I2CE_UserAccess_Mechanism->getSessionUserName()

getUserId()

This public method is inherited from I2CE_UserAccess_Mechanism->getUserId()

getUserIds()

This public method is inherited from I2CE_UserAccess_Mechanism->getUserIds()

getUserInfo()

This public method is inherited from I2CE_UserAccess_Mechanism->getUserInfo()

getUserNameFromId()

This public method is inherited from I2CE_UserAccess_Mechanism->getUserNameFromId()

getUsersByInfo()

This public method is inherited from I2CE_UserAccess_Mechanism->getUsersByInfo()

hasBeenLoggedOut()

This public method is inherited from I2CE_UserAccess_Mechanism->hasBeenLoggedOut()

hasSession()

This public method is inherited from I2CE_UserAccess_Mechanism->hasSession()

isLoggingFromAnotherIP()

This public method is inherited from I2CE_UserAccess_Mechanism->isLoggingFromAnotherIP()

isRequired()

This public method is inherited from I2CE_UserAccess_Mechanism->isRequired()

logOutPreviousSessions()

This public method is inherited from I2CE_UserAccess_Mechanism->logOutPreviousSessions()

setSession()

This public method is inherited from I2CE_UserAccess_Mechanism->setSession()

setUserInfo()

This public method is inherited from I2CE_UserAccess_Mechanism->setUserInfo()

unsetSession()

This public method is inherited from I2CE_UserAccess_Mechanism->unsetSession()

updateSessionActivity()

This public method is inherited from I2CE_UserAccess_Mechanism->updateSessionActivity()

userExists()

This public method is inherited from I2CE_UserAccess_Mechanism->userExists()

userHasDefaultPassword()

This public method is inherited from I2CE_UserAccess_Mechanism->userHasDefaultPassword()

userHasPassword()

This public method is inherited from I2CE_UserAccess_Mechanism->userHasPassword()

_hasMethod()

This public method is inherited from I2CE_Fuzzy->_hasMethod()

Inherited Variables

$options

Theis protected variable is inherited from I2CE_UserAccess_Mechanism->$options

$protocol

Theis protected variable is inherited from I2CE_UserAccess_Mechanism->$protocol

Inherited Fuzzy Methods

userMessage()

This method is inherited from I2CE_Fuzzy->userMessage()