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

@ -57,6 +57,9 @@ $conf = array(
'file_dirpublic_path' => 'files/default',
'file_directory_temp' => '/tmp',
// View the landing page instead of user login page:
# 'landing_page' => 1,
// Social links:
# 'social_website' => 'http://www.example.com',
# 'social_rss' => 'http://www.example.com/feed',

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');
}

View file

@ -91,9 +91,6 @@ body.not-logged-in[class*="page-user"] #main-wrapper,
body.not-logged-in[class*="page-user"] #main-content div.tabs {
background: transparent;
}
body.not-logged-in[class*="page-user"] #page-wrapper {
height: 100%;
}
body.not-logged-in[class*="page-user"] #page-title {
display: none;
}