Skip to content
Snippets Groups Projects
Commit 8312b799 authored by Matthew Slater's avatar Matthew Slater
Browse files

fixed a bug assuming that a user object was being passed to the user_name_alter hook.

parent 73870fa2
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@ function alt_login_help($route_name, $route_match) {
* @note there's no easy way to dedupe accounts' display names.
*/
function alt_login_user_format_name_alter(&$name, AccountInterface $account) {
if ($account->isAnonymous() and !$account->isNew()) { // includes accounts tha
if ($account->isAnonymous() or ($account instanceof UserInterface and $account->isNew())) {
// This will be the configured 'anonymous' value
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment