mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-28 12:19:57 +03:00
fixes #2292 distinguish auth methods
This commit is contained in:
parent
5182e69dcd
commit
ff5e8e6168
1 changed files with 17 additions and 0 deletions
|
@ -603,6 +603,23 @@ function pwg_activity($object, $object_id, $action, $details=array())
|
||||||
$user_agent = strip_tags($_SERVER['HTTP_USER_AGENT']);
|
$user_agent = strip_tags($_SERVER['HTTP_USER_AGENT']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// we want to know if the login is automatic with remember_me (auto_login)
|
||||||
|
// or with an authentication key provided in the URL (auth_key_login)
|
||||||
|
if ('user' == $object and 'login' == $action)
|
||||||
|
{
|
||||||
|
if (function_exists('debug_backtrace'))
|
||||||
|
{
|
||||||
|
$called_functions = array_flip(array_column(debug_backtrace(), 'function'));
|
||||||
|
foreach (array('auto_login', 'auth_key_login') as $auth_function)
|
||||||
|
{
|
||||||
|
if (isset($called_functions[$auth_function]))
|
||||||
|
{
|
||||||
|
$details['auth_function'] = $auth_function;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ('photo' == $object and 'add' == $action and !isset($details['sync']))
|
if ('photo' == $object and 'add' == $action and !isset($details['sync']))
|
||||||
{
|
{
|
||||||
$details['added_with'] = 'app';
|
$details['added_with'] = 'app';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue