Esempio n. 1
0
 public static function setPasswordsEncryption($encryption)
 {
     if (isset(self::$passwordsEncryptions[strtolower($encryption)])) {
         self::$passwordsEncryption = strtolower($encryption);
     } else {
         new Error_Critic('#C-12', 'Invalid passwords encryption ( ' . htmlspecialchars($encryption) . '). Must be one of these: ' . implode(', ', self::$passwordsEncryptions));
     }
 }
Esempio n. 2
0
 public static function updatePasswordEncryption()
 {
     $encryptionTypeLowerd = strtolower(self::getServerConfig()->getValue('passwordType'));
     if (empty($encryptionTypeLowerd)) {
         // TFS 1.1+
         $encryptionTypeLowerd = $config['site']['encryptionType'];
         if (empty($encryptionTypeLowerd)) {
             $encryptionTypeLowerd = 'sha1';
         }
     }
     if (isset(self::$passwordsEncryptions[$encryptionTypeLowerd])) {
         self::$passwordsEncryption = $encryptionTypeLowerd;
     } else {
         new Error_Critic('#C-12', 'Invalid passwords encryption ( ' . htmlspecialchars($encryption) . '). Must be one of these: ' . implode(', ', self::$passwordsEncryptions));
     }
 }