diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-16 10:06:58 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-16 10:06:58 -0700 |
commit | 78ee4193b70329c8e0929efd18c22324dd2ad8e0 (patch) | |
tree | 900c686f12934fdf168ebe214afc1cb414bf4683 /modules/notification/helpers | |
parent | bc241e44c2e4d10ac19ccc32a40c90426672d963 (diff) |
Remove all non Identity API methods from Identity.php. Created an MY_Session class to provide the user state changes in the session and a login.php helper that has the login form.
Diffstat (limited to 'modules/notification/helpers')
-rw-r--r-- | modules/notification/helpers/notification.php | 8 | ||||
-rw-r--r-- | modules/notification/helpers/notification_event.php | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/modules/notification/helpers/notification.php b/modules/notification/helpers/notification.php index 2e22eeae..64eed8dc 100644 --- a/modules/notification/helpers/notification.php +++ b/modules/notification/helpers/notification.php @@ -20,7 +20,7 @@ class notification { static function get_subscription($item_id, $user=null) { if (empty($user)) { - $user = Identity::active(); + $user = Session::active_user(); } return ORM::factory("subscription") @@ -31,7 +31,7 @@ class notification { static function is_watching($item, $user=null) { if (empty($user)) { - $user = Identity::active(); + $user = Session::active_user(); } return ORM::factory("subscription") @@ -44,7 +44,7 @@ class notification { static function add_watch($item, $user=null) { if ($item->is_album()) { if (empty($user)) { - $user = Identity::active(); + $user = Session::active_user(); } $subscription = ORM::factory("subscription"); $subscription->item_id = $item->id; @@ -56,7 +56,7 @@ class notification { static function remove_watch($item, $user=null) { if ($item->is_album()) { if (empty($user)) { - $user = Identity::active(); + $user = Session::active_user(); } $subscription = ORM::factory("subscription") diff --git a/modules/notification/helpers/notification_event.php b/modules/notification/helpers/notification_event.php index d519bdc4..f0530cd9 100644 --- a/modules/notification/helpers/notification_event.php +++ b/modules/notification/helpers/notification_event.php @@ -95,7 +95,7 @@ class notification_event_Core { } static function site_menu($menu, $theme) { - if (!Identity::active()->guest) { + if (!Session::active_user()->guest) { $item = $theme->item(); if ($item && $item->is_album() && access::can("view", $item)) { |