public function authenticate($password)
{
if ($this->password_ver == 'sha1') {
return sha1($password) == $this->password;
}
return $this->{$this->securePasswordField} === crypt($password, $this->{$this->securePasswordField});
}