function express_dashboard_user_user_login in Express 7.2
Implements hook_user_login().
Send user to dashboard after logging in.
File
- modules/
custom/ express_dashboards/ express_dashboard_user/ express_dashboard_user.module, line 8
Code
function express_dashboard_user_user_login(&$edit, $account) {
// Your logic will set $redirection to the desired location
$redirection = 'admin/dashboard/user';
// Unless there is already a redirection going, or the user is trying to reset his password, we redirect to $redirection.
if (empty($_GET['destination']) && !is_null($redirection) && (!isset($_POST['form_id']) || $_POST['form_id'] != 'user_pass_reset')) {
$edit['redirect'] = $redirection;
}
}