By damiankloip on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Introduced in version:
dev
Description:
drupal_anonymous_user() has been replaced by the AnonymousUserSession class.
Drupal 7:
$anonymous_user = drupal_anonymous_user();
Drupal 8:
use Drupal\Core\Session\AnonymousUserSession;
...
$anonymous_user = new AnonymousUserSession();
Impacts:
Module developers