Hello/Hi/Greetings,
identification.php allows to send remeber_me=1. This behaves that the cookie expire time is set to 1 year.
Can you extend the webservice pwg.session.login by the same option?
Can the expiration period made be confiurable in Admin Space?
Thanks in advance!
Offline
So I've seen that session time is already configurable.
Regarding remember_me option in WebService - as far as I can see I suggest the following changes:
ws.php
...
$service->addMethod(
'pwg.session.login',
'ws_session_login',
array(
'username' => array(),
'password' => array('default'=>null),
'remember_me' => array('default'=>0),
),
'Tries to login the user.',
$ws_functions_root . 'pwg.php',
array('post_only'=>true)
);
...
pwg.php
...
function ws_session_login($params, &$service)
{
if (try_log_user($params['username'], $params['password'], $params['remember_me']))
{
return true;
}
return new PwgError(999, 'Invalid username/password');
}
...
What do you think?
Offline