diff options
author | friendica <info@friendica.com> | 2012-01-27 12:56:36 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-01-27 12:56:36 -0800 |
commit | 5161be67e9f4eebe5723b44ddd3ad37e18f0a632 (patch) | |
tree | 89553157fcbbead7b7cb2fef873f6be0c99dd6fe /include/security.php | |
parent | 039eec360ade26e29e1c1d74ed6ab127cd539a4d (diff) | |
download | volse-hubzilla-5161be67e9f4eebe5723b44ddd3ad37e18f0a632.tar.gz volse-hubzilla-5161be67e9f4eebe5723b44ddd3ad37e18f0a632.tar.bz2 volse-hubzilla-5161be67e9f4eebe5723b44ddd3ad37e18f0a632.zip |
logging of manage identities
Diffstat (limited to 'include/security.php')
-rwxr-xr-x | include/security.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/security.php b/include/security.php index ed5777109..bc2c9f0bf 100755 --- a/include/security.php +++ b/include/security.php @@ -35,6 +35,7 @@ function authenticate_success($user_record, $login_initial = false, $interactive } $master_record = $a->user; + if((x($_SESSION,'submanage')) && intval($_SESSION['submanage'])) { $r = q("select * from user where uid = %d limit 1", intval($_SESSION['submanage']) @@ -47,18 +48,22 @@ function authenticate_success($user_record, $login_initial = false, $interactive dbesc($master_record['password']), dbesc($master_record['email']) ); - if(count($r)) + if($r && count($r)) $a->identities = $r; else $a->identities = array(); - $r = q("select `user`.`uid`, `user`.`username`, `user`.`nickname` from manage left join user on manage.mid = user.uid + $r = q("select `user`.`uid`, `user`.`username`, `user`.`nickname` + from manage left join user on manage.mid = user.uid where `manage`.`uid` = %d", intval($master_record['uid']) ); if($r && count($r)) $a->identities = array_merge($a->identities,$r); + if($login_initial) + logger('auth_identities: ' . print_r($a->identities,true), LOGGER_DEBUG); + $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 1 LIMIT 1", intval($_SESSION['uid'])); if(count($r)) { |