Announcement

#1 2014-05-08 18:08:02

Petteri
Guest

Does not remember the login with iPhone

Hello/Hi/Greetings,

I am using private galleries that are visible only for registered users. Everything is working fine except when I open the site with my iPhone 5S. No galleries are shown until I go to the login page. It has the name and the password there but no cross in "remember me" -selection (or similar as I'm using the finnish version). When you put the cross in there and tap the login, it opens up the site.

This is rather difficult as the login page in the mobile version is buried behind a very small icon and two sub-pages.

Could I change this somehow so that the "remember me" -selection would be the default value or is there some other workaround?

Piwigo version: 2.6.2
PHP version: 5.3.16
MySQL version: 5.1.73-1.1
Piwigo URL: http://petterihyryla.fi/piw

 

#2 2014-05-08 19:16:13

Petteri
Guest

Re: Does not remember the login with iPhone

Correction: In the english version it the seems to have "Auto login" not "Remember Me".

 

#3 2014-05-08 20:18:32

Petteri
Guest

Re: Does not remember the login with iPhone

There is this code in the "identification.php" (rows 35-73):

//-------------------------------------------------------------- identification
$redirect_to = '';
if ( !empty($_GET['redirect']) )
{
  $redirect_to = urldecode($_GET['redirect']);
  if ( is_a_guest() )
  {
    $page['errors'][] = l10n('You are not authorized to access the requested page');
  }
}

if (isset($_POST['login']))
{
  if (!isset($_COOKIE[session_name()]))
  {
    $page['errors'][] = l10n('Cookies are blocked or not supported by your browser. You must enable cookies to connect.');
  }
  else
  {
    if ($conf['insensitive_case_logon'] == true)
    {
      $_POST['username'] = search_case_username($_POST['username']);
    }
   
    $redirect_to = isset($_POST['redirect']) ? urldecode($_POST['redirect']) : '';
    $remember_me = isset($_POST['remember_me']) and $_POST['remember_me']==1;
   
    if ( try_log_user($_POST['username'], $_POST['password'], $remember_me) )
    {
      redirect(empty($redirect_to) ? get_gallery_home_url() : $redirect_to);
    }
    else
    {
      $page['errors'][] = l10n('Invalid password!');
    }
  }
}

//----------------------------------------------------- template initialization

I am not so familiar with the php -code so maybe you could help me with this one. How should I change the code so that it would have that remember_me -value true as default? The iPhone cookie handling does not seem to allow to save that value.

Or am I totally wrong and missing  something? Maybe there is something that has to be configured differently in iPhone. It is able to save the username and password but not this one.

 

#4 2014-05-11 08:20:28

Petteri
Guest

Re: Does not remember the login with iPhone

I managed to correct it myself. I deactivated the Grum, AStat and Piwecard -plugins. Then it started to login as it should.

 

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2019 · Contact