diff options
Diffstat (limited to 'phpBB/phpbb/passwords/driver/salted_md5.php')
-rw-r--r-- | phpBB/phpbb/passwords/driver/salted_md5.php | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/phpBB/phpbb/passwords/driver/salted_md5.php b/phpBB/phpbb/passwords/driver/salted_md5.php index 08b0db29a0..72db8d200f 100644 --- a/phpBB/phpbb/passwords/driver/salted_md5.php +++ b/phpBB/phpbb/passwords/driver/salted_md5.php @@ -57,7 +57,7 @@ class salted_md5 extends base */ public function hash($password, $setting = '') { - if ($setting != '') + if ($setting) { if (($settings = $this->get_hash_settings($setting)) === false) { @@ -95,14 +95,10 @@ class salted_md5 extends base { if (strlen($hash) !== 34) { - return (md5($password) === $hash) ? true : false; + return md5($password) === $hash; } - if ($hash === $this->hash($password, $hash)) - { - return true; - } - return false; + return $hash === $this->hash($password, $hash); } /** |