From 347b12ab2ede1778439e3f2556e39a09ab72ae99 Mon Sep 17 00:00:00 2001 From: jacob Date: Fri, 28 Jan 2011 20:16:43 +0000 Subject: [PATCH] Oops - only update the session user id for the newly created user if it's the same account and the same conference as the one doing the user creation --- account.inc.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/account.inc.php b/account.inc.php index f7a4c23..0d1579f 100644 --- a/account.inc.php +++ b/account.inc.php @@ -228,7 +228,12 @@ function account_add_role($accounts_id, $roles_id, $conferences_id, $password = }else{ // They're not actually connected to this conference, let's hook 'em up $u = user_create($accounts_id, $conferences_id); - $_SESSION['users_id'] = $users_id = $u['id']; + $users_id = $u['id']; + + // if this applies to their current session, update their session user id + if($_SESSION['accounts_id'] == $accounts_id && $_SESSION['conferences_id'] == $conferences_id){ + $_SESSION['users_id'] = $users_id; + } } // we now have the user id that we need, let's check to see whether or not they