Ignore:
Timestamp:
Feb 23, 2010, 4:49:54 PM (15 years ago)
Author:
plg
Message:

bug 1452 fixed: check cookies are enabled in web browser and notify user
otherwise that she can't connect.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/identification.php

    r3046 r4955  
    4646if (isset($_POST['login']))
    4747{
    48   $redirect_to = isset($_POST['redirect']) ? $_POST['redirect'] : '';
    49   $remember_me = isset($_POST['remember_me']) and $_POST['remember_me']==1;
    50   if ( try_log_user($_POST['username'], $_POST['password'], $remember_me) )
     48  if (!isset($_COOKIE[session_name()]))
    5149  {
    52     redirect(empty($redirect_to) ? make_index_url() : $redirect_to);
     50    array_push(
     51      $errors,
     52      l10n('Cookies are blocked or not supported by your browser. You must enable cookies to connect.')
     53      );
    5354  }
    5455  else
    55   {
    56     array_push( $errors, l10n('invalid_pwd') );
     56  {
     57    $redirect_to = isset($_POST['redirect']) ? $_POST['redirect'] : '';
     58    $remember_me = isset($_POST['remember_me']) and $_POST['remember_me']==1;
     59    if ( try_log_user($_POST['username'], $_POST['password'], $remember_me) )
     60    {
     61      redirect(empty($redirect_to) ? make_index_url() : $redirect_to);
     62    }
     63    else
     64    {
     65      array_push( $errors, l10n('invalid_pwd') );
     66    }
    5767  }
    5868}
Note: See TracChangeset for help on using the changeset viewer.