4 require_once
'Services/User/exceptions/class.ilUserException.php';
48 foreach(
$config as $key => $value)
50 switch(strtolower($key))
52 case 'password_encoder':
55 case 'encoder_factory':
69 throw new ilUserException(sprintf(
'"encoder_factory" must be instance of ilUserPasswordEncoderFactory and set in %s.', json_encode(
$config)));
79 if(self::$instance instanceof
self)
81 return self::$instance;
84 require_once
'Services/User/classes/class.ilUserPasswordEncoderFactory.php';
89 'default_password_encoder' =>
'bcryptphp',
90 'ignore_security_flaw' =>
true 93 'password_encoder' =>
'bcryptphp' 97 self::$instance = $password_manager;
98 return self::$instance;
141 if($encoder->requiresSalt())
143 require_once
'Services/Password/classes/class.ilPasswordUtils.php';
176 $user->resetPassword($raw, $raw);
182 if($encoder->requiresReencoding($user->
getPasswd()))
184 $user->resetPassword($raw, $raw);
verifyPassword(ilObjUser $user, $raw)
Class for user related exception handling in ILIAS.
encodePassword(ilObjUser $user, $raw)
__construct(array $config=array())
Please use the singleton method for instance creation The constructor is still public because of the ...
setEncoderFactory(ilUserPasswordEncoderFactory $encoder_factory)
static getBytes($length)
Generate random bytes using OpenSSL or Mcrypt and mt_rand() as fallback.
setPasswd($a_str, $a_type=IL_PASSWD_PLAIN)
set password public
setEncoderName($encoder_name)
Create styles array
The data for the language used.
isEncodingTypeSupported($name)
setPasswordSalt($password_salt)
setPasswordEncodingType($password_encryption_type)
getPasswordEncodingType()
static getInstance()
Single method to reduce footprint (included files, created instances)