Piwik\SettingsPiwik::isUserCredentialsSanityCheckEnabled PHP Method

isUserCredentialsSanityCheckEnabled() public static method

Should Piwik check that the login & password have minimum length and valid characters?
public static isUserCredentialsSanityCheckEnabled ( ) : boolean
return boolean True if checks enabled; false otherwise
    public static function isUserCredentialsSanityCheckEnabled()
    {
        return Config::getInstance()->General['disable_checks_usernames_attributes'] == 0;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Returns true if the password is complex enough (at least 6 characters and max 26 characters)
  *
  * @param $input string
  * @return bool
  */
 public static function isValidPasswordString($input)
 {
     if (!SettingsPiwik::isUserCredentialsSanityCheckEnabled() && !empty($input)) {
         return true;
     }
     $l = strlen($input);
     return $l >= self::PASSWORD_MIN_LENGTH;
 }
All Usage Examples Of Piwik\SettingsPiwik::isUserCredentialsSanityCheckEnabled