Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By kim.pepper on
Change record status:
Draft (View all draft change records)
Project:
Introduced in branch:
11.x
Introduced in version:
10.3
Issue links:
Description:
user_logout() and user_login_finalize() are deprecated and replaced with a service.
Before | After |
---|---|
user_login_finalize($account); |
\Drupal::service('user.session_finalize')->finalizeLogin($account); |
user_logout(); |
\Drupal::service('user.session_finalize')->finalizeLogout(); |
Impacts:
Module developers