Seditio Source
Root |
./othercms/xenForo 2.2.8/src/XF/Authentication/vBulletin5.php
<?php

namespace XF\Authentication;

class
vBulletin5 extends AbstractAuth
{
    public function
getAuthenticationName()
    {
        return
'XF:vBulletin5';
    }

    public function
generate($password)
    {
        throw new \
LogicException('Cannot generate authentication for this type.');
    }

    protected function
getHandler()
    {
        return new
PasswordHash(\XF::config('passwordIterations'), false);
    }

    protected function
createHash($password)
    {
        return
md5($password);
    }

    public function
authenticate($userId, $password)
    {
        if (!
is_string($password) || $password === '' || empty($this->data))
        {
            return
false;
        }

       
$userHash = $this->createHash($password);
        return
password_verify($userHash, $this->data['token']);
    }
}