Esempio n. 1
0
 /**
  * Password policy for a new password (e.g. minLength, maxLength)
  *
  * @return array
  */
 public function getPasswordPolicy()
 {
     $policy = parent::getPasswordPolicy();
     // Limit maxLength to the database limit
     if (!isset($policy['maxLength']) || $policy['maxLength'] > 32) {
         $policy['maxLength'] = 32;
     }
     return $policy;
 }
Esempio n. 2
0
 /**
  * Password policy for a new password (e.g. minLength, maxLength)
  *
  * @return array
  */
 public function getPasswordPolicy()
 {
     $policy = $this->getCatalog()->getPasswordPolicy($this->getLoggedInPatron());
     return $policy !== false ? $policy : parent::getPasswordPolicy();
 }
Esempio n. 3
0
 /**
  * Password policy for a new password (e.g. minLength, maxLength)
  *
  * @return array
  */
 public function getPasswordPolicy()
 {
     $policy = $this->getCatalog()->getPasswordPolicy($this->getLoggedInPatron());
     if ($policy === false) {
         return parent::getPasswordPolicy();
     }
     if (isset($policy['pattern']) && empty($policy['hint'])) {
         $policy['hint'] = $this->getCannedPasswordPolicyHint($policy['pattern']);
     }
     return $policy;
 }