Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292452

Deprecate user_logout() and user_login_finalize() and replace with a service

$
0
0

Problem/Motivation

We are calling the procedural functions user_login_finalize() and user_logout() in user.module.

However, these have a load of dependencies such as

  • AccountInterface
  • SessionInterface
  • SessionManagerInterface
  • EntityTypeManagerInterface
  • ModuleHandlerInterface
  • LoggerInterface

Let's create a service and do proper dependency injection.

Steps to reproduce

Proposed resolution

  • create a new \Drupal\user\UserSessionHandlerInterface and \Drupal\user\UserSessionHandler
  • define a new 'user.user_session_handler' service
  • deprecate user_login_finalize() and user_logout()
  • replace all usages in core

Remaining tasks

User interface changes

API changes

  • user_login_finalize() and user_logout() are deprecated
  • a new 'user.user_session_handler' service is added

Data model changes

Release notes snippet

Original summary

Lets move this somewhere..maybe the User entity controller? i am not really sure cause it has to do with session


Viewing all articles
Browse latest Browse all 292452

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>