function luxe_login_page in Luxe 7
1 string reference to 'luxe_login_page'
File
- ./
luxe.module, line 55
Code
function luxe_login_page() {
global $user;
if ($user->uid) {
drupal_goto('user/' . $user->uid);
}
$login_form = drupal_get_form('user_login');
$login_form = drupal_render($login_form);
if (variable_get('luxe_login_register_form', 0)) {
$register_form = drupal_get_form('user_register_form');
}
else {
$register_form = array(
'#method' => 'post',
'#action' => url('user/register/'),
'#form_id' => 'user_login_register',
'#type' => 'form',
'username' => array(
'#type' => 'hidden',
'#attributes' => array(
'id' => array(
'luxe-regname',
),
),
),
'submit' => array(
'#value' => t('Create an account'),
'#type' => 'submit',
),
);
}
$vars = array(
'login_form' => $login_form,
'login_title' => variable_get('luxe_login_title', 'Login'),
'login_register_title' => variable_get('luxe_login_register_title', 'Don\'t have an Account?'),
'login_register_form' => drupal_render($register_form),
'login_register_intro' => check_plain(variable_get('luxe_login_register_intro', '')),
'register_title' => variable_get('luxe_register_title', 'Sign up'),
);
return theme('luxe_login', $vars);
}