2014-09-03 88 views
0

我正在尝试登录提供电子邮件和密码。我尝试过散列,而不是自己散列密码。我运行dd(Auth::attempt(Input::except('submit')));,它返回false。是的,阵列是正确的。是的,这就是数据库中的内容。我跟着attempt()Illuminate/Auth/Guard.php attempt()该函数的代码如下。雄辩Auth登录不起作用

public function attempt(array $credentials = array(), $remember = false, $login = true) 
{ 
    $this->fireAttemptEvent($credentials, $remember, $login); 

    $this->lastAttempted = $user = $this->provider->retrieveByCredentials($credentials); 

    // If an implementation of UserInterface was returned, we'll ask the provider 
    // to validate the user against the given credentials, and if they are in 
    // fact valid we'll log the users into the application and return true. 
    if ($this->hasValidCredentials($user, $credentials)) 
    { 
     if ($login) $this->login($user, $remember); 

     return true; 
    } 

    return false; 
} 

该功能根本没有被修改。 dd($user);返回正确的信息,用户的实例具有从数据库中提取的属性。和dd($credentials);返回发布信息的数组,电子邮件和密码。

dd($this->hasValidCredentials($user, $credentials));返回boolean false

我不知道为什么。让我知道是否需要更多信息。谢谢!

回答

0

我的密码表有20个字符限制。我是个白痴。它现在有效。