Class: I2CE UserAccess (Development)

From IHRIS Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.


This article describes the class I2CE_UserAccess .

@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.

$accessTable

the user access table.

$logTable

the user acitivity log table.

Methods

__construct()

Create a new instance of a default I2CE table 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 id

_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

_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

  • Defined in i2ce/modules/User/modules/UserAccess/lib/I2CE_UserAccess.php on line 174
  • Signature: public function _setUserInfo($username,$setRole,$details)
  • Parameters:
    • string $username
    • mixed $setRole
      Defaulst to false. If a string, it is the role to assign to the user @param string
      • Default Value: false
    • $details
      • Default Value: array()
  • Returns: boolean.
    true on success

_userExists()

See if a user is in the system

_userHasDefaultPassword()

checks to see if the user has a default password (one set by administrator) @param string $password

_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 @param string $passwd

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

getDetailName()

Returns the display name of the given detail

hasBeenLoggedOut()

Check to see if this user has been logged out by other means.

isLoggingFromAnotherIP()

Check if the user is logged in from a given IP address

isRequired()

Checks to see if the indicated detail is required $param string $detail returns boolean

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

logOutPreviousSessions()

Logs out any previous existing sessions if single login option is set.

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()