Optional landing page via config setting
This commit is contained in:
parent
2bf3647dd4
commit
fcb34088be
3 changed files with 8 additions and 4 deletions
|
@ -57,6 +57,9 @@ $conf = array(
|
||||||
'file_dirpublic_path' => 'files/default',
|
'file_dirpublic_path' => 'files/default',
|
||||||
'file_directory_temp' => '/tmp',
|
'file_directory_temp' => '/tmp',
|
||||||
|
|
||||||
|
// View the landing page instead of user login page:
|
||||||
|
# 'landing_page' => 1,
|
||||||
|
|
||||||
// Social links:
|
// Social links:
|
||||||
# 'social_website' => 'http://www.example.com',
|
# 'social_website' => 'http://www.example.com',
|
||||||
# 'social_rss' => 'http://www.example.com/feed',
|
# 'social_rss' => 'http://www.example.com/feed',
|
||||||
|
|
|
@ -370,11 +370,15 @@ function user_edit_submit($form, &$form_state) {
|
||||||
* users.
|
* users.
|
||||||
*/
|
*/
|
||||||
function user_page() {
|
function user_page() {
|
||||||
global $user;
|
global $user, $conf;
|
||||||
|
|
||||||
if ($user->uid) {
|
if ($user->uid) {
|
||||||
menu_set_active_item('user/'. $user->uid);
|
menu_set_active_item('user/'. $user->uid);
|
||||||
return menu_execute_active_handler();
|
return menu_execute_active_handler();
|
||||||
}
|
}
|
||||||
|
elseif (drupal_is_front_page() && !$conf['landing_page']) {
|
||||||
|
drupal_goto('user/login');
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
return drupal_get_form('user_login');
|
return drupal_get_form('user_login');
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,9 +91,6 @@ body.not-logged-in[class*="page-user"] #main-wrapper,
|
||||||
body.not-logged-in[class*="page-user"] #main-content div.tabs {
|
body.not-logged-in[class*="page-user"] #main-content div.tabs {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
body.not-logged-in[class*="page-user"] #page-wrapper {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
body.not-logged-in[class*="page-user"] #page-title {
|
body.not-logged-in[class*="page-user"] #page-title {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue