From: Roland Häder Date: Thu, 19 Jul 2018 11:11:03 +0000 (+0200) Subject: Fixes applied: (#5399) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0b38f1c58b822ac1ec5a199de00f0a0631c01a61;p=friendica.git Fixes applied: (#5399) - $_SESSION['remember_user'] did only exist here and no where else - it seems to be accient old-lost code, so I fixed it to $a->user['nickname'] instead - used multi-line comment for multiple lines of on-line comments Signed-off-by: Roland Häder --- diff --git a/include/security.php b/include/security.php index 9cff670787..768d7c82d4 100644 --- a/include/security.php +++ b/include/security.php @@ -171,12 +171,14 @@ function authenticate_success($user_record, $login_initial = false, $interactive } if ($login_initial) { - // If the user specified to remember the authentication, then set a cookie - // that expires after one week (the default is when the browser is closed). - // The cookie will be renewed automatically. - // The week ensures that sessions will expire after some inactivity. + /* + * If the user specified to remember the authentication, then set a cookie + * that expires after one week (the default is when the browser is closed). + * The cookie will be renewed automatically. + * The week ensures that sessions will expire after some inactivity. + */ if ($_SESSION['remember']) { - logger('Injecting cookie for remembered user ' . $_SESSION['remember_user']['nickname']); + logger('Injecting cookie for remembered user ' . $a->user['nickname']); new_cookie(604800, $user_record); unset($_SESSION['remember']); }