laravel/framework — pull request #3194 by stidges (2014-01-11 16:09:07+00:00)
Title: Add getLastAttempted method to Auth\Guard class

I am trying to implement a legacy password upgrader in my current application.
If `Auth::attempt()` fails, I want to compare a legacy hash of the entered password against the password in the database. If it is a legacy password, it gets updated to a new hashed password in the database.

As it currently stands there is no way to get the last retrieved user from the Auth class, as `$lastAttempted` is protected and has no getter method. This forces me to either extend the `Guard` class, or re-retrieve the user from the database.

This pull request solves this issue by implementing a getter method for the `$lastAttempted` property.