Class: I2CE UserAccess Mechanism (4.1.7)
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.1.7-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 449
- 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 491
- 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 176
- Signature: public function _getUserId($username)
- Parameters:
- string $username
- Returns: int
or false on failure
_getUserIds()
Gets the user ids @param string $username
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 148
- Signature: public function _getUserIds()
_getUserInfo()
Gets the indicated user details as well as the role. worker function
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 294
- 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 198
- 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 379
- 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 329
- 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 529
- 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 240
- 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 389
- 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 207
- 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 215
- 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 423
- 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 464
- 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 540
- Signature: public function displayName($username,$user)
- Parameters:
- Returns: string
doAutoLogin()
Check to see if we should do a automatic login
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 83
- Signature: public function doAutoLogin()
ensureDefaultOptions()
Ensure default options are set
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 99
- Signature: protected function ensureDefaultOptions($options)
- Parameters:
- array $options
- Returns: array;
generatePassword()
Generate a password
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 112
- 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 249
- Signature: public function getAllowedDetails()
- Returns: array
getAutoLoginUser()
Get the username for an autologin
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 90
- Signature: public function getAutoLoginUser()
- Returns: string
getDetailName()
Returns the display name of the given detail
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 398
- 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 621
- 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 608
- 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 595
- 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 583
- 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 157
- Signature: final public function getUserId($username)
- Parameters:
- string $username
- Returns: int
or false on failure
getUserIds()
Gets the user ids
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 134
- Signature: final public function getUserIds()
- Returns: array
of ids
getUserInfo()
Gets the indicated user details as well as the role
- Defined in i2ce/lib/I2CE_UserAccess_Mechanism.php on line 260
- 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 185
- 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 341
- 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 575
- 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 408
- 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 504
- 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 551
- 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 306
- 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 565
- 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 514
- 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 226
- 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()