mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-28 10:40:28 +02:00
[feature/passwords] Get rid of unneeded code complexity
Simplified a little bit of code as pointed out by imkingdavid on github. PHPBB3-11610
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user