Class: I2CE UserAccess (Development)
This article describes the class I2CE_UserAccess .
- Extends the class: I2CE_UserAccess_Mechanism.
- Location: Part of the module UserAccess in the package I2CE 4.1-dev
- Source: Defined in the file modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 34
- Author: Carl Leitner <litlfred@ibiblio.org>
- Since: v4.0.3
@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.
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 147
- Type: protected $detailTable
$accessTable
the user access table.
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 152
- Type: protected string $accessTable
$logTable
the user acitivity log table.
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 159
- Type: protected string $logTable
Methods
__construct()
Create a new instance of a default I2CE table user access mechanism
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 136
- 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/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 423
- Signature: public function _changePassword($username,$old_password,$new_password)
- Parameters:
- Returns: boolean
_createUser()
Create user worker method
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 614
- Signature: public function _createUser($username,$password,$role,$details)
- Parameters:
- Returns: boolean.
true on success
_getUserId()
Gets the user id from the user name
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 352
- Signature: public function _getUserId($username)
- Parameters:
- string $username
- Returns: int
or false on failure
_getUserIds()
Gets the user id
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 371
- Signature: public function _getUserIds()
- Returns: array
of ids
_getUserInfo()
Gets the indicated user details as well the role
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 225
- Signature: public function _getUserInfo($username,$getRole,$details)
- Parameters:
- string $username @oaram boolean $getRole Defaults to false
- $getRole
- Default Value: false
- $details
- Default Value: array()
- Returns: array.
associative array of user info (role, email and other details)
_getUserNameFromId()
Gets the user id from the username
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 396
- 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/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 266
- 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()
Gets the role assigned to a user
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 174
- Signature: public function _setUserInfo($username,$setRole,$details)
- Parameters:
- Returns: boolean.
true on success
_userExists()
See if a user is in the system
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 327
- Signature: public function _userExists($username,$has_role)
- Parameters:
- Returns: boolean.
_userHasDefaultPassword()
checks to see if the user has a default password (one set by administrator) @param string $password
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 484
- Signature: public function _userHasDefaultPassword($username)
- Parameters:
- string $username
- Returns: boolean
_userHasPassword()
verifies that the specified user has the specified password
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 455
- 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/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 315
- Signature: public function canChangePassword()
- Returns: boolean
canCreateNewUser()
Whether or not this acccess mechansim can create ne users
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 50
- Signature: public function canCreateNewUser()
- Returns: boolean
canEditUserDetails()
Whether or not this acccess mechansim can create edit details of existing users
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 58
- Signature: public function canEditUserDetails()
- Returns: boolean
displayName()
Gets the display name for the user
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 631
- Signature: public function displayName($username,$user)
- Parameters:
- Returns: string
encryptPassword()
Encrypts the password @param string $passwd
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 42
- Signature: protected function encryptPassword($password)
- Parameters:
- $password
- Returns: string
ensureDefaultOptions()
ensrure default options are set
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 129
- Signature: public function ensureDefaultOptions($options)
- Parameters:
- array $options
- Returns: array
getAllowedDetails()
Gets an array of the allowed details
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 68
- Signature: public function getAllowedDetails()
- Returns: array
getDetailColumnTypes()
An array of the details and their associated mdb2 types
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 92
- Signature: protected function getDetailColumnTypes()
getDetailColumns()
An array of the details and their associated columns
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 78
- Signature: protected function getDetailColumns()
getDetailName()
Returns the display name of the given detail
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 108
- Signature: public function getDetailName($detail)
- Parameters:
- string $detail
- Returns: string
hasBeenLoggedOut()
Check to see if this user has been logged out by other means.
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 574
- Signature: public function hasBeenLoggedOut($username)
- Parameters:
- string $username
- Returns: boolean
isLoggingFromAnotherIP()
Check if the user is logged in from a given IP address
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 554
- Signature: public function isLoggingFromAnotherIP($username,$ip_address)
- Parameters:
- Returns: boolean.
true when a user is attempting multiple logins
isRequired()
Checks to see if the indicated detail is required $param string $detail returns boolean
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 640
- 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/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 511
- Signature: public function logActivity($username,$activity,$ip_address,$timestamp)
- Parameters:
- string $username
- $activity
- Default Value: 'access'
- $ip_address
- Default Value: '127.0.0.1'
- $timestamp
- Default Value: null
logOutPreviousSessions()
Logs out any previous existing sessions if single login option is set.
- Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 589
- Signature: public function logOutPreviousSessions($username)
- Parameters:
- string $username
- Returns: boolean
Inherited Methods
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()
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()
hasSession()
This public method is inherited from I2CE_UserAccess_Mechanism->hasSession()
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()