Support the ongoing development of Laravel.io →
Configuration Authentication Database

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?

Last updated 2 years ago.
0

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

Last updated 2 years ago.
0

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 :)

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

mxalix258 mxalix258 Joined 20 Apr 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.