Redirects to home page after login.
This commit is contained in:
parent
c1cebcbddd
commit
b0431c2926
@ -37,3 +37,16 @@ function zencrm_theme() {
|
|||||||
function zencrm_page_attachments(array &$page) {
|
function zencrm_page_attachments(array &$page) {
|
||||||
$page['#attached']['library'][] = 'zencrm/opencase-lib';
|
$page['#attached']['library'][] = 'zencrm/opencase-lib';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implements hook_user_login().
|
||||||
|
*/
|
||||||
|
function zencrm_user_login(\Drupal\user\UserInterface $account) {
|
||||||
|
// Default login destination to the dashboard.
|
||||||
|
$current_request = \Drupal::service('request_stack')->getCurrentRequest();
|
||||||
|
if (!$current_request->query->get('destination')) {
|
||||||
|
$current_request->query->set(
|
||||||
|
'destination', '/'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user