generateAuthHash early when session is active, it will get cached in session

pull/1185/head
Isaac Connor 2016-09-28 09:08:36 -04:00
parent 48d9f31fa9
commit 1ae23b49bf
1 changed files with 8 additions and 3 deletions

View File

@ -55,9 +55,14 @@ function getAffectedIds( $name ) {
return( $ids );
}
if ( ZM_OPT_USE_AUTH && ZM_AUTH_HASH_LOGINS && empty($user) && !empty($_REQUEST['auth']) ) {
if ( $authUser = getAuthUser( $_REQUEST['auth'] ) ) {
userLogin( $authUser['Username'], $authUser['Password'], true );
if ( ZM_OPT_USE_AUTH && ZM_AUTH_HASH_LOGINS ) {
if ( empty($user) && !empty($_REQUEST['auth']) ) {
if ( $authUser = getAuthUser( $_REQUEST['auth'] ) ) {
userLogin( $authUser['Username'], $authUser['Password'], true );
}
} else {
// generate it once here, while session is open. Value will be cached in session and return when called later on
generateAuthHash( ZM_AUTH_HASH_IPS );
}
}