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