package Gems
subpackage User
copyright Copyright (c) 2011 Erasmus MC
license New BSD License
since Class available since version 1.5

 Methods

Check for password weakness.

reportPasswordWeakness(\Gems_User_User $user, string $password, array $codes) : mixed

Parameters

$user

\Gems_User_User

$password

string

Or null when you want a report on all the rules for this password.

$codes

array

An array of code names that identify rules that should be used only for those codes.

Returns

mixedString or array of strings containing warning messages

_addError()

_addError(\type $errorMsg) 

Parameters

$errorMsg

\type

Test the password for minimum number of upper case characters.

capsCount(mixed $parameter, string $password) 

Parameters

$parameter

mixed

$password

string

Tests if the password appears on a (weak) password list. The list should be a simpe newline separated list of (lowercase) passwords.

inPasswordList(string $parameter, string $password) 

Parameters

$parameter

string

Filename of the password list, relative to APPLICATION_PATH

$password

string

The password

Test the password for minimum number of lower case characters.

lowerCount(mixed $parameter, string $password) 

Parameters

$parameter

mixed

$password

string

Test the password for maximum age (in days).

maxAge(mixed $parameter, string $password) 

Parameters

$parameter

mixed

$password

string

Test the password for minimum length.

minLength(mixed $parameter, string $password) 

Parameters

$parameter

mixed

$password

string

Test the password for minimum number non letter characters.

notAlphaCount(mixed $parameter, string $password) 

Parameters

$parameter

mixed

$password

string

Test the password for minimum number not alphanumeric characters.

notAlphaNumCount(mixed $parameter, string $password) 

Parameters

$parameter

mixed

$password

string

The password should not contain the name of the user or the login name.

notTheName(mixed $parameter, string $password) 

Parameters

$parameter

mixed

$password

string

Test the password for minimum number of numeric characters.

numCount(mixed $parameter, string $password) 

Parameters

$parameter

mixed

$password

string

 Properties

 

$_errors

$_errors : array

Default

array()
 

$cache

$cache : \Zend_Cache

Default

 

$project

$project : \Gems_Project_ProjectSettings

Default

 

$translate

$translate : \Zend_Translate

Default

 

$user

$user : \Gems_User_User

Default