diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index b56ada8..6ed4656 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -1549,6 +1549,19 @@ function drupal_set_title($title = NULL, $output = Title::CHECK_PLAIN) { } /** + * Generates a default anonymous $user object. + * + * @return \Drupal\Core\Session\AccountInterface + * The user session object. + * + * @deprecated as of Drupal 8.0. Use \Drupal\Core\Session\AnonymousUserSession() + * instead. + */ +function drupal_anonymous_user() { + return new AnonymousUserSession(); +} + +/** * Ensures Drupal is bootstrapped to the specified phase. * * In order to bootstrap Drupal from another PHP script, you can use this code: