Commit 932f7f4c authored by frjo's avatar frjo
Browse files

#1018034: Better handeling of faild logins, redirect to user/login.

parent 8c46786a
......@@ -319,8 +319,8 @@ function colorbox_get_path() {
*/
function colorbox_form_alter(&$form, $form_state, $form_id) {
if ($form_id == variable_get('colorbox_login_form', '') && arg(0) == 'user' && arg(1) == 'login' && arg(2) == 'colorbox') {
$destination = isset($_REQUEST['destination']) ? urlencode($_REQUEST['destination']) : 'user';
$form['#action'] = url($_GET['q'], array('query' => array('destination' => $destination)));
$destination = isset($_GET['destination']) ? urlencode($_GET['destination']) : 'user';
$form['#action'] = url('user/login', array('query' => array('destination' => $destination)));
$form['name']['#size'] = 25;
$form['pass']['#size'] = 25;
}
......
......@@ -11,12 +11,6 @@
*/
function colorbox_login() {
$form_id = variable_get('colorbox_login_form', '');
// Redirect failed logins to the standard user login form.
if (isset($_POST['form_id']) && $_POST['form_id'] == $form_id) {
return drupal_get_form('user_login');
}
colorbox_form_page($form_id);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment