Class: I2CE UserAccess Mechanism (4.0.5)
This article describes the class I2CE_UserAccess_Mechanism .
- Extends the class: I2CE_Fuzzy.
- Child Classes:
- Location: Part of the module I2CE in the package I2CE 4.0.5-release
- Source: Defined in the file lib/I2CE_UserAccess_Mechanism.php on line 33
- Author: Carl Leitner <litlfred@ibiblio.org>
- Since: v4.0.3
@filesource Class I2CE_UserAccess_Mechanism
Variables
$options
. Intialization options
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 37
- Type: protected array $options
$protocol
. The user access protocol this is.
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 42
- Type: protected string $protocol
Methods
__construct()
Create a new instance of a default I2CE table user access mechanism
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 46
- Signature: public function __construct()
_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.
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 406
- Signature: public function _changePassword($username,$old_password,$new_password)
- Parameters:
- Returns: boolean
true on success
_createUser()
Create user worker method
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 448
- Signature: public function _createUser($username,$password,$role,$details)
- Parameters:
- Returns: boolean.
true on success
_getUserId()
Gets the user id from the username. Worker method
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 133
- Signature: public function _getUserId($username)
- Parameters:
- string $username
- Returns: int
or false on failure
_getUserInfo()
Gets the indicated user details as well as the role. worker function
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 251
- Signature: protected function _getUserInfo($username,$getRole,$details)
- Parameters:
- Returns: array
with indexed by the values of $details and values the corresponding detail. Returns false on failure
_getUserNameFromId()
Gets the user id from the username
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 155
- Signature: public function _getUserNameFromId($userid)
- Parameters:
- int $userid
- Returns: string
or false on failure
_getUsersByInfo()
Gets the userss by the indicated details as well as the role. worker method @oaram boolean $role Defaults to false
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 336
- Signature: public function _getUsersByInfo($role,$details)
- Parameters:
- $role
- Default Value: false
- array $details
of string. The details we wish on the user. Defaults to empty array- Default Value: array()
- $role
- Returns: array
of usernames which mathc the give input
_setUserInfo()
sets the indicated user details/role . worker function
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 286
- Signature: protected function _setUserInfo($username,$setRole,$details)
- Parameters:
- Returns: boolean
true on success
_userExists()
See if a user is in the system
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 486
- Signature: public function _userExists($username,$has_role)
- Parameters:
- Returns: boolean.
_userHasPassword()
verifies that the specified user has the specified password.
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 197
- Signature: public function _userHasPassword($username,$password)
- Parameters:
- Returns: boolean
canChangePassword()
Whether or not this acccess mechansim can change a user's password
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 346
- Signature: public function canChangePassword()
- Returns: boolean
canCreateNewUser()
Whether or not this acccess mechansim can create ne users
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 164
- Signature: public function canCreateNewUser()
- Returns: boolean
canEditUserDetails()
Whether or not this acccess mechansim can create edit details of existing users
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 172
- Signature: public function canEditUserDetails()
- Returns: boolean
changePassword()
Change the password for this user. 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 i2ce/lib/I2CE_UserAccess_Mechanism.php on line 380
- Signature: final public function changePassword($username,$old_password,$new_password)
- Parameters:
- Returns: booelan.
true on success
createUser()
Create user .
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 421
- Signature: final public function createUser($username,$password,$role,$details)
- Parameters:
- Returns: boolean.
true on success
displayName()
Gets the display name for the userdetails
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 497
- Signature: public function displayName($username,$user)
- Parameters:
- Returns: string
ensureDefaultOptions()
Ensure default options are set
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 80
- Signature: protected function ensureDefaultOptions($options)
- Parameters:
- array $options
- Returns: array;
generatePassword()
Generate a password
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 93
- Signature: public function generatePassword()
- Returns: string
getAllowedDetails()
Gets an array of the allowed user details such as email, firstname, lastname
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 206
- Signature: public function getAllowedDetails()
- Returns: array
getDetailName()
Returns the display name of the given detail
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 355
- Signature: public function getDetailName($detail)
- Parameters:
- string $detail
- Returns: string
getSessionDetails()
Get any user details stored in the session
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 578
- Signature: static final public function getSessionDetails()
- Returns: mixed.
an array of details on succes, null on failture
getSessionID()
Get any user id
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 565
- Signature: static final public function getSessionID()
- Returns: mixed.
an int on succes, false on failture
getSessionRole()
Get any user role
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 552
- Signature: static final public function getSessionRole()
- Returns: mixed.
an strint on succes, null on failture
getSessionUserName()
Get any username stored in the suession
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 540
- Signature: static final public function getSessionUserName()
- Returns: mixed.
an string on succes, null on failture
getUserId()
Gets the user id from the username
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 114
- Signature: final public function getUserId($username)
- Parameters:
- string $username
- Returns: int
or false on failure
getUserInfo()
Gets the indicated user details as well as the role
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 217
- Signature: final public function getUserInfo($username,$getRole,$details)
- Parameters:
- Returns: array
with indexed by the values of $details and values the corresponding detail. Returns false on failture
getUserNameFromId()
Gets the user id from the username
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 142
- Signature: final public function getUserNameFromId($userid)
- Parameters:
- int $userid
- Returns: string
or false on failure
getUsersByInfo()
Gets the userss by the indicated details as well as the role. worker method @oaram boolean $role Defaults to false
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 298
- Signature: public function getUsersByInfo($role,$details,$include_internal)
- Parameters:
- Returns: array
of usernames which mathc the give input
hasSession()
Checks to see if a user has been stored in the session
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 532
- Signature: static final public function hasSession()
isRequired()
Checks to see if the indicated detail is required $param string $detail returns boolean
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 365
- Signature: public function isRequired($detail)
- Parameters:
- $detail
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
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 461
- Signature: public function logActivity($username,$activity,$timestamp)
- Parameters:
- string $username
- $activity
- Default Value: 'access'
- $timestamp
- Default Value: null
setSession()
Store info on the authenticated user in session variables @param array $deatails. array of user details
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 508
- Signature: static final public function setSession($username,$role,$details,$id)
- Parameters:
setUserInfo()
sets the indicated user details/role.
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 263
- Signature: final public function setUserInfo($username,$setRole,$details)
- Parameters:
- Returns: boolean
true on success
unsetSession()
Store info on the authenticated user in session variables @param string $username @param string $role @param array $deatails. array of user details
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 522
- Signature: static final public function unsetSession()
userExists()
See if a user is in the system
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 471
- Signature: final public function userExists($username,$has_role)
- Parameters:
- Returns: boolean.
userHasPassword()
verifies that the specified user has the specified password.
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 183
- Signature: final public function userHasPassword($username,$password)
- Parameters:
- Returns: boolean
Inherited Methods
_hasMethod()
This public method is inherited from I2CE_Fuzzy->_hasMethod()
Inherited Fuzzy Methods
userMessage()
This method is inherited from I2CE_Fuzzy->userMessage()