Class cApiUser
User item
In current version you can administer optional password checks via following configuration values:
- En- or disabling checks: $cfg['password']['check_password_mask'] = [true|false] Use this flag to enable (true) or disable (false) the mask checks.
$cfg['password']['use_cracklib'] = [true|false] Use this to enable (true) or disable (false) the strength check, currently done with cracklib.
- Mask checks: Password mask checks are checks belonging to the "format" of the needed password string.
$cfg['password']['min_length'], int Minimum length a password has to have. If not set, 8 chars are set as default $cfg['password']['numbers_mandatory'], int If set to a value greater than 0, at least $cfg['password']['numbers_mandatory'] numbers must be in password $cfg['password']['symbols_mandatory'], int && $cfg['password']['symbols_regex'], String If 'symbols_mandatory' set to a value greater than 0, at least so many symbols has to appear in given password. What symbols are regcognized can be administrated via 'symbols_regex'. This has to be a regular expression which is used to "find" the symbols in $password. If not set, following RegEx is used: "/[|!@#$%&*\/=?,;.:-_+~^ยจ\]/" $cfg['password']['mixed_case_mandatory'], int If set to a value greater than 0 so many lower and upper case character must appear in the password. (e.g.: if set to 2, 2 upper and 2 lower case characters must appear)
- Strength check Passwords should have some special characteristics to be a strong, i.e. not easy to guess, password. Currently cracklib is supported. These are the configuration possibilities:
$cfg['password']['cracklib_dict'], string Path and file name (without file extension!) to dictionary you want to use. This setting is mandatory!
Keep in mind that these type of check only works if crack module is available.
- cGenericDb
- cItemBaseAbstract
- Item
- cApiUser
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Bjoern Behrens
Author: Holger Librenz
Located at classes/contenido/class.user.php
public
|
|
public
boolean
|
|
public
boolean
|
|
public static
boolean
|
|
public static
boolean
|
|
public static
integer
|
#
checkPasswordMask( string $password )
Checks a given password against some predefined rules like minimum character length, required special character, etc... This behaviour is configurable in global configuration $cfg['password']. |
public
string
|
|
public
boolean
|
|
public
string
|
|
public
|
|
public
integer
|
#
setPassword( string $password )
Checks password which has to be set and return PASS_* values (i.e. on success PASS_OK). |
public
integer
|
#
savePassword( string $password )
This method saves the given password $password. The password has to be checked, before it is set to the database. The resulting integer value represents the result code. Use the PASS_* constants to check what happens. |
public
string
|
|
public
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
array
|
|
public
integer
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
array
|
|
public
|
|
public
|
|
public
|
|
public
|
#
setAddressData( string $sStreet, string $sCity, string $sZip, string $sCountry )
Setter method to set address data |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
string
|
#
getEffectiveUserPerms( )
Function returns effective perms for user including group rights as perm string. |
public
array
|
#
getGroupNamesByUserID( string $userid = NULL, boolean $bAddDescription = true )
Returns group names where the user is in. |
public
array
|
|
public
string
|
#
getUserProperty( string $type, string $name, boolean $group = false )
Retrieves the effective user property. |
public
array
|
#
getUserPropertiesByType( string $type, boolean $group = false )
Returns all user properties by type. |
public
array
|
|
public
|
|
public
boolean
|
|
public static
string
|
#
getErrorString( integer $iErrorCode )
This static method provides a simple way to get error messages depending on error code $iErrorCode, which is returned by checkPassword* methods. |
_getPropertiesCollectionInstance(),
_getSecondDBInstance(),
escape()
|
_executeCallbacks(),
register(),
unregister()
|
integer |
PASS_OK
Password is ok and stored. |
#
0
|
integer |
PASS_TO_SHORT
Given password is to short |
#
1
|
integer |
PASS_NOT_STRONG
Given password is not strong enough |
#
2
|
integer |
PASS_NOT_COMPLEX
Given password is not complex enough |
#
3
|
integer |
PASS_NOT_ENOUGH_NUMBERS
Password does not contain enough numbers. |
#
4
|
integer |
PASS_NOT_ENOUGH_SYMBOLS
Password does not contain enough symbols. |
#
5
|
integer |
PASS_NOT_ENOUGH_MIXED_CHARS
Password does not contain enough mixed characters. |
#
6
|
integer |
PASS_NOT_ENOUGH_DIFFERENT_CHARS
Password does not contain enough different characters. |
#
7
|
integer |
EXCEPTION_USERNAME_EXISTS
Exception code, which is used if you try to add an user that already exists. |
#
8
|
integer |
EXCEPTION_PASSWORD_INVALID
Exception code, which is used if an password is set to save that is not valid. |
#
9
|
integer |
MIN_PASS_LENGTH_DEFAULT
This value will be used if no minimum length for passwords are set via $cfg['password']['min_length'] |
#
8
|
CREATE_BEFORE,
CREATE_FAILURE,
CREATE_SUCCESS,
DELETE_BEFORE,
DELETE_FAILURE,
DELETE_SUCCESS,
STORE_BEFORE,
STORE_FAILURE,
STORE_SUCCESS
|
$_arrInFilters,
$_arrOutFilters,
$_lastSQL,
$_metaObject,
$modifiedValues,
$oldPrimaryKey,
$values
|
$_className,
$_oCache,
$_settings,
$db,
$lasterror,
$primaryKey,
$properties,
$secondDb,
$table,
$virgin
|