I'm having trouble getting the Laravel password reset functionality to work. I think the issue stems from that I have a 'username' column instead of 'email' column in my users database.
If I do:
Password::remind(array('username' => Input::get('username')), function($message)
{
$message->subject('Password Reminder');
});
I get: Address in mailbox given [] does not comply with RFC 2822, 3.6.2.
If I change to:
Password::remind(array('email' => Input::get('username')), function($message)
{
$message->subject('Password Reminder');
});
I get: Column not found: 1054 Unknown column 'email' in 'where clause'
Any advice?
Try something like
$user = User::whereUsername(Input::get('username'));
// Check if it exists ...
Password::remind($user->email) ...
array('email' => Input::get('username')
email is not the same as username so that won't work because it can't send an email to JohnDoe. It needs johndoe@example.com
Can I ask if you resolved this, and if so how...
i have recently started seeing thins on a build that was updated, which worked before, the only change so far being the composer update which has bumped the swiftmailer version to 5.3.0
Pretty much nothing has been changed from the out-of-the-box password remind chain, with the function being run as follows....
incidentally, I have absolutely double ensured that the email is indeed correct, so I know 100% that is not the issue.
protected function getPasswordRemindResponse()
{
$email = Input::only("email");
return Password::remind($email, function($message)
{
$message->subject('Password Reminder');
});
}
Any help appreciated :)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community