Created
January 7, 2017 21:54
-
-
Save normanlolx/640a437004a341296c95736cba00e5d8 to your computer and use it in GitHub Desktop.
Drupal 8 user login redirect to front page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_user_login(). | |
*/ | |
function MYMODULE_user_login($account) { | |
\Drupal::service('request_stack')->getCurrentRequest()->query->set('destination', '/'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment