summaryrefslogtreecommitdiffstats
path: root/application/libraries/Duser
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-09-04 12:18:55 +0200
committerFlorian Pritz <bluewind@xinu.at>2013-09-04 12:18:55 +0200
commit720808fc3884a415dc483b50796697a095d1b5b8 (patch)
treef7c272f9dd210a4b0e93793bfc46e3c736db5105 /application/libraries/Duser
parente24ceb9bdebd8d8b3ff76be111dfca00a2dcc6a1 (diff)
Set login session data in one go
This reduces the amount of db queries and cookies we create since each update triggers an db update and (which is a bug) sets a new cookie. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/libraries/Duser')
-rw-r--r--application/libraries/Duser/Duser.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/application/libraries/Duser/Duser.php b/application/libraries/Duser/Duser.php
index 733616b40..96d61e3cc 100644
--- a/application/libraries/Duser/Duser.php
+++ b/application/libraries/Duser/Duser.php
@@ -75,10 +75,12 @@ class Duser extends CI_Driver_Library {
$CI =& get_instance();
- $CI->session->set_userdata('logged_in', true);
- $CI->session->set_userdata('username', $login_info["username"]);
- $CI->session->set_userdata('userid', $login_info["userid"]);
- $CI->session->set_userdata('access_level', 'full');
+ $CI->session->set_userdata(array(
+ 'logged_in' => true,
+ 'username' => $login_info["username"],
+ 'userid' => $login_info["userid"],
+ 'access_level' => 'full',
+ ));
return true;
}