diff --git a/core/modules/user/user.module b/core/modules/user/user.module index 9532545..a16a4e7 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -539,7 +539,7 @@ function user_preprocess_block(&$variables) { * is called on it before it is printed to the page. * * @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0. - * Use \Drupal\Core\Session\Interface::getUsername(). + * Use \Drupal\Core\Session\AccountInterface::getDisplayName(). */ function user_format_name(AccountInterface $account) { return $account->getDisplayName(); diff --git a/core/modules/user/user.tokens.inc b/core/modules/user/user.tokens.inc index c94ab0d..d613879 100644 --- a/core/modules/user/user.tokens.inc +++ b/core/modules/user/user.tokens.inc @@ -99,7 +99,7 @@ function user_tokens($type, $tokens, array $data = array(), array $options = arr case 'username': $username = $account->getUsername(); - $replacements[$original] = $sanitize ? check_plain($username) : $username; + $replacements[$original] = $sanitize ? String::checkPlain($username) : $username; break; case 'mail':