diff --git a/alt_login.module b/alt_login.module index 6cf010028817e8e42e2d99741114dc2e1c7f8c2e..42a9149aa1bac467cbc8dca54db18e4e94c41083 100644 --- a/alt_login.module +++ b/alt_login.module @@ -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; }