Validate user variable before continuing token replacement

Created on 22 May 2015, over 9 years ago
Updated 22 February 2023, almost 2 years ago

Problem/Motivation

Trying to resolve [user:last-login] token leads to fatal error

PHP Fatal error: Call to undefined method Drupal\Core\Session\AccountProxy::getLastLoginTime() in /[...]/core/modules/user/user.tokens.inc on line 111

Proposed resolution

Remaining tasks

User interface changes

API changes

🐛 Bug report
Status

Active

Version

9.5

Component
User module 

Last updated 3 days ago

Created by

🇮🇹Italy mondrake 🇮🇹

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024