Optional landing page via config setting

This commit is contained in:
Manuel Cillero 2017-09-25 22:07:15 +02:00
parent 2bf3647dd4
commit fcb34088be
3 changed files with 8 additions and 4 deletions

View file

@ -370,11 +370,15 @@ function user_edit_submit($form, &$form_state) {
* users.
*/
function user_page() {
global $user;
global $user, $conf;
if ($user->uid) {
menu_set_active_item('user/'. $user->uid);
return menu_execute_active_handler();
}
elseif (drupal_is_front_page() && !$conf['landing_page']) {
drupal_goto('user/login');
}
else {
return drupal_get_form('user_login');
}