function total_control_user_login in Total Control Admin Dashboard 7.2
Implements hook_user_login(). Redirects to the dashboard if configured.
File
- ./
total_control.module, line 107
Code
function total_control_user_login(&$edit, $account) {
// Don't redirect for password reset.
if (!(arg(0) == 'user' && arg(1) == 'reset')) {
// Check for permission to use total control.
if (user_access('have total control', $account)) {
// Check for redirect to dashboard setting.
if (variable_get('total_control_login_redirect', 0) == 1) {
// TODO Make sure destination is not already set.
//if (!isset($_GET['destination'])) {
// TODO worry about overlay module.
$_GET['destination'] = 'admin/dashboard';
//}
}
}
}
}