diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery/helpers/user.php | 7 | ||||
-rw-r--r-- | modules/gallery/libraries/drivers/Identity.php | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/modules/gallery/helpers/user.php b/modules/gallery/helpers/user.php index 2044964f..f148f720 100644 --- a/modules/gallery/helpers/user.php +++ b/modules/gallery/helpers/user.php @@ -174,10 +174,13 @@ class user_Core { return $locale; } - /** - * Make sure that we have a session and group_ids cached in the session. + /** + * Make sure that we have a session and group_ids cached in the session. This is one + * of the first calls to reference the user so call the Identity::instance to load the + * driver classes. */ static function load_user() { + Identity::instance(); $session = Session::instance(); if (!($user = $session->get("user"))) { $session->set("user", $user = self::guest()); diff --git a/modules/gallery/libraries/drivers/Identity.php b/modules/gallery/libraries/drivers/Identity.php index 558679be..aa5bbd4c 100644 --- a/modules/gallery/libraries/drivers/Identity.php +++ b/modules/gallery/libraries/drivers/Identity.php @@ -147,6 +147,7 @@ abstract class User_Definition { case "hash": case "url": case "locale": + case "groups": return $this->user->$column; case "hashed_password": throw new Exception("@todo WRITE ONLY FIELD: $column"); @@ -160,6 +161,7 @@ abstract class User_Definition { public function __set($column, $value) { switch ($column) { case "id": + case "groups": throw new Exception("@todo READ ONLY FIELD: $column"); break; case "name": @@ -188,6 +190,7 @@ abstract class User_Definition { public function __unset($column) { switch ($column) { case "id": + case "groups": throw new Exception("@todo READ ONLY FIELD: $column"); break; case "name": |