Cron checks for a user's last password reset date and when the password should expire. Currently the code reads:
$user_last_reset = $user->get('field_last_password_reset')->get(0)->getValue();
...
$user_expired = $user->get('field_password_expiration')->get(0)->getValue();
This throws an error about use of a member function where it's not possible to use it (getValue()). Unsure exactly what the error was, I fixed it and refreshed ;)
Patch attached to resolve the issue - it's a single-value field so you shouldn't need to do ->get(0) on it.
Comments
Comment #2
sophie.skPatch attached.
Comment #3
nerdsteinThanks, I'll pull this down and give it a test drive.
Comment #4
nerdsteinThe patch was generated relative to the docroot and not the module. I had to clean it up.
Since I was in there, I removed some deprecated functions and added some annotations in to make the code more readable.
Attached is a new patch, which was already tested and will be merged into 8.x-3.x.
Comment #5
nerdsteinPushed