fix Password: no extension error
This commit is contained in:
parent
265cf68540
commit
9cfc498e44
@ -134,13 +134,25 @@ class Password {
|
|||||||
*/
|
*/
|
||||||
public function checkSameTryAll($encrypted, $text) {
|
public function checkSameTryAll($encrypted, $text) {
|
||||||
// 判斷是否吻合
|
// 判斷是否吻合
|
||||||
if($encrypted == $this->encrypt($text)
|
if($encrypted == $this->encrypt($text) ||
|
||||||
|| $encrypted == $text
|
$encrypted == $text)
|
||||||
|| (function_exists('sha1') && $encrypted == $this->sha1Encrypt($text))
|
return true;
|
||||||
|| (function_exists('md5') && $encrypted == $this->md5Encrypt($text))
|
else {
|
||||||
|| (function_exists('crypt') && $encrypted == $this->cryptEncrypt($text))
|
if (function_exists('md5')) {
|
||||||
) return true;
|
if($encrypted == $this->md5Encrypt($encrypted))
|
||||||
else return false;
|
return true;
|
||||||
|
}
|
||||||
|
if (function_exists('sha1')) {
|
||||||
|
if($encrypted == $this->sha1Encrypt($encrypted))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (function_exists('crypt')) {
|
||||||
|
if($encrypted == $this->cryptEncrypt($encrypted))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user