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|boolean
|
|
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|boolean
|
#
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. |
__get(),
__set(),
_getPropertiesCollectionInstance(),
_getSecondDBInstance(),
_setLoaded(),
_setPrimaryKeyName(),
escape(),
getPrimaryKeyName(),
isLoaded()
|
_executeCallbacks(),
register(),
unregister()
|
integer |
PASS_OK
|
0 |
#
Password is ok and stored. |
integer |
PASS_TO_SHORT
|
1 |
#
Given password is to short |
integer |
PASS_NOT_STRONG
|
2 |
#
Given password is not strong enough |
integer |
PASS_NOT_COMPLEX
|
3 |
#
Given password is not complex enough |
integer |
PASS_NOT_ENOUGH_NUMBERS
|
4 |
#
Password does not contain enough numbers. |
integer |
PASS_NOT_ENOUGH_SYMBOLS
|
5 |
#
Password does not contain enough symbols. |
integer |
PASS_NOT_ENOUGH_MIXED_CHARS
|
6 |
#
Password does not contain enough mixed characters. |
integer |
PASS_NOT_ENOUGH_DIFFERENT_CHARS
|
7 |
#
Password does not contain enough different characters. |
integer |
EXCEPTION_USERNAME_EXISTS
|
8 |
#
Exception code, which is used if you try to add an user that already exists. |
integer |
EXCEPTION_PASSWORD_INVALID
|
9 |
#
Exception code, which is used if an password is set to save that is not valid. |
integer |
MIN_PASS_LENGTH_DEFAULT
|
8 |
#
This value will be used if no minimum length for passwords are set via $cfg['password']['min_length'] |
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,
$_loaded,
$_oCache,
$_primaryKeyName,
$_settings,
$db,
$lasterror,
$properties,
$secondDb,
$table
|