string buildSelectUserQuery(
string
$user, string
$usertable, string
$userfield, string
$passwordfield, [string
$accountdisablefield = null], [string
$accountenbleexpression = null]
)
|
|
Build the query for selecting the user for authentication
Parameters:
|
string |
$user: |
|
|
string |
$usertable: |
|
|
string |
$userfield: |
|
|
string |
$passwordfield: |
|
|
string |
$accountdisablefield: |
|
|
string |
$accountenbleexpression: |
|
API Tags:
| Return: | which contains the query |
Redefined in descendants as:
Does the authentication method support md5 encoding of passwords?
API Tags:
| Return: | True if md5 is always used. false if md5 is not supported. Drivers that support both md5 and cleartext passwords can return atkconfig("authentication_md5") to let the application decide whether to use md5. |
Redefinition of:
- auth_interface::canMd5()
- Does the authentication method support md5 encoding of passwords?
the getAccessLevel(
array
$recs
)
|
|
Get the access level from the user
Parameters:
|
array |
$recs: |
The records that are returned by the selectUser function |
API Tags:
void getAttribEntity(
String
$node, String
$attrib, String
$mode, mixed
3
)
|
|
This function returns the level/group(s) that are allowed to view/edit a certain attribute of a given node.
Parameters:
|
String |
$node: |
The full nodename of the node for which to check attribute access. |
|
String |
$attrib: |
The name of the attribute to check |
|
String |
$mode: |
"view" or "edit" |
|
mixed |
3: |
One (int) or more (array) entities that are allowed to view/edit the attribute. |
Redefinition of:
- auth_interface::getAttribEntity()
- This function returns the level/group(s) that are allowed to view/edit a certain attribute of a given node.
mixed getEntity(
String
$node, String
$action
)
|
|
This function returns the level/group(s) that are allowed to perform the given action on a node.
Parameters:
|
String |
$node: |
The full nodename of the node for which to check the privilege. (modulename.nodename) |
|
String |
$action: |
The privilege to check. |
API Tags:
| Return: | One (int) or more (array) entities that are allowed to perform the action. |
Redefinition of:
- auth_interface::getEntity()
- This function returns the level/group(s) that are allowed to perform the given action on a node.
array getParentGroups(
array
$parents
)
|
|
Get the parent groups
Parameters:
API Tags:
| Return: | with records of the parent groups |
mixed getPassword(
array
$rec
)
|
|
returns the users password from record
Parameters:
|
array |
$rec: |
record from database |
API Tags:
Redefinition of:
- auth_interface::getPassword()
- This function returns password or false, if password can't be retrieve/recreate
const getPasswordPolicy(
)
|
|
This function returns "get password" policy for current auth method
Redefinition of:
- auth_interface::getPasswordPolicy()
- This function returns "get password" policy for current auth method
mixed gettingPassword(
string
$username
)
|
|
This function returns password or false, if password can't be retrieve/recreate
Parameters:
|
string |
$username: |
User for which the password should be regenerated |
API Tags:
| Return: | string with password or false |
array getUser(
String
$user
)
|
|
This function returns information about a user in an associative array with the following elements (minimal): "name" -> the userid (should normally be the same as the $user variable that gets passed to it.
"level" -> The level/group(s) to which this user belongs. "groups" -> The groups this user belongs to "access_level" -> The user's access level The other elemens of the returning array depend on the structure of the user table
Parameters:
|
String |
$user: |
The login of the user to retrieve. |
API Tags:
| Return: | Information about a user. |
Redefinition of:
- auth_interface::getUser()
- This function returns information about a user in an associative array with the following elements: "name" -> the userid (should normally be the same as the $user variable that gets passed to it.
Redefined in descendants as:
This function returns the list of users that may login. This can be used to display a dropdown of users from which to choose.
API Tags:
| Return: | List of users as an associative array with the following format: array of records, each record is an associative array with a userid and a username field. |
Redefinition of:
- auth_interface::getUserList()
- This function returns the list of users that may login. This can be used to display a dropdown of users from which to choose.
bool isLocked(
array
$rec
)
|
|
checks wether the useraccount is locked
Parameters:
|
array |
$rec: |
record from db |
API Tags:
| Return: | true in case of a locked account |
boolean matchPasswords(
string
$dbpasswd, string
$userpasswd
)
|
|
Match 2 passwords.
In normal situations, $dbpassword and $userpasswd are considered equal if they are a case-insensitive match. When $config_auth_cryptedpassword is true, they are only considered a match if $dbpassword is equal to the crypt() of $userpasswd, where $dbpassword itself is used as the 'salt'. (This method is used by Bugzilla, among other apps)
Parameters:
|
string |
$dbpasswd: |
The password from the database |
|
string |
$userpasswd: |
The password the user provided |
API Tags:
| Return: | which indicates if the passwords are equal |
array selectUser(
string
$user
)
|
|
Select the user record from the database
Parameters:
API Tags:
| Return: | with user information |
Redefined in descendants as:
true setPasswordAllowed(
)
|
|
This function returns a boolean that is true when the class allows the resetting of the password of a user.
API Tags:
| Deprecated: | Seems like this function is not used anymore |
boolean userListCompare(
array
$a, array
$b
)
|
|
Compare function for sorting users on their username
Parameters:
int validateUser(
String
$user, String
$passwd
)
|
|
Authenticate a user.
Parameters:
|
String |
$user: |
The login of the user to authenticate. |
|
String |
$passwd: |
The password of the user. Note: if the canMd5 function of an implementation returns true, $passwd will be passed as an md5 string. |
API Tags:
| Return: | AUTH_SUCCESS - Authentication succesful AUTH_MISMATCH - Authentication failed, wrong user/password combination AUTH_LOCKED - Account is locked, can not login with current username. AUTH_ERROR - Authentication failed due to some error which cannot be solved by just trying again. If you return this value, you *must* also fill the m_fatalError variable. |
Redefinition of:
- auth_interface::validateUser()
- Authenticate a user.
Redefined in descendants as: