diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-08 19:52:10 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-08 19:52:10 +0000 |
commit | ccb6d625239b59b283b4d3fc00da704ab743d74c (patch) | |
tree | da9b11d8758b3007c025e4d5487410ae1ca69f68 /actions | |
parent | 1368785a6b6f9c946dcc5eca078540bacce71f60 (diff) | |
download | elgg-ccb6d625239b59b283b4d3fc00da704ab743d74c.tar.gz elgg-ccb6d625239b59b283b4d3fc00da704ab743d74c.tar.bz2 |
Refs #2543: Updated trunk mods and views to use the new functions from previous 2 commits.
git-svn-id: http://code.elgg.org/elgg/trunk@8079 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions')
-rw-r--r-- | actions/admin/user/ban.php | 2 | ||||
-rw-r--r-- | actions/admin/user/delete.php | 2 | ||||
-rw-r--r-- | actions/admin/user/removeadmin.php | 2 | ||||
-rw-r--r-- | actions/comments/add.php | 2 | ||||
-rw-r--r-- | actions/comments/delete.php | 2 | ||||
-rw-r--r-- | actions/email/save.php | 2 | ||||
-rw-r--r-- | actions/friends/add.php | 4 | ||||
-rw-r--r-- | actions/friends/addcollection.php | 4 | ||||
-rw-r--r-- | actions/friends/deletecollection.php | 4 | ||||
-rw-r--r-- | actions/friends/remove.php | 2 | ||||
-rw-r--r-- | actions/likes/add.php | 4 | ||||
-rw-r--r-- | actions/likes/delete.php | 2 | ||||
-rw-r--r-- | actions/notifications/settings/usersettings/save.php | 2 | ||||
-rw-r--r-- | actions/plugins/usersettings/save.php | 2 | ||||
-rw-r--r-- | actions/user/default_access.php | 2 | ||||
-rw-r--r-- | actions/user/language.php | 2 | ||||
-rw-r--r-- | actions/user/name.php | 2 | ||||
-rw-r--r-- | actions/user/password.php | 4 | ||||
-rw-r--r-- | actions/user/spotlight.php | 2 | ||||
-rw-r--r-- | actions/useradd.php | 2 | ||||
-rw-r--r-- | actions/widgets/delete.php | 2 | ||||
-rw-r--r-- | actions/widgets/move.php | 2 |
22 files changed, 27 insertions, 27 deletions
diff --git a/actions/admin/user/ban.php b/actions/admin/user/ban.php index a8fa57925..209ece2a0 100644 --- a/actions/admin/user/ban.php +++ b/actions/admin/user/ban.php @@ -12,7 +12,7 @@ $guid = get_input('guid'); $user = get_entity($guid); -if ($guid == get_loggedin_userid()) { +if ($guid == elgg_get_logged_in_user_guid()) { register_error(elgg_echo('admin:user:self:ban:no')); forward(REFERER); } diff --git a/actions/admin/user/delete.php b/actions/admin/user/delete.php index c6ed5b819..04061ac0c 100644 --- a/actions/admin/user/delete.php +++ b/actions/admin/user/delete.php @@ -13,7 +13,7 @@ $guid = get_input('guid'); $user = get_entity($guid); -if ($guid == get_loggedin_userid()) { +if ($guid == elgg_get_logged_in_user_guid()) { register_error(elgg_echo('admin:user:self:delete:no')); forward(REFERER); } diff --git a/actions/admin/user/removeadmin.php b/actions/admin/user/removeadmin.php index 4466e925f..8cebc7078 100644 --- a/actions/admin/user/removeadmin.php +++ b/actions/admin/user/removeadmin.php @@ -9,7 +9,7 @@ $guid = get_input('guid'); $user = get_entity($guid); -if ($guid == get_loggedin_userid()) { +if ($guid == elgg_get_logged_in_user_guid()) { register_error(elgg_echo('admin:user:self:removeadmin:no')); forward(REFERER); } diff --git a/actions/comments/add.php b/actions/comments/add.php index 38c91c412..5bd741413 100644 --- a/actions/comments/add.php +++ b/actions/comments/add.php @@ -21,7 +21,7 @@ if (!$entity) { forward(REFERER); } -$user = get_loggedin_user(); +$user = elgg_get_logged_in_user_entity(); $annotation = create_annotation($entity->guid, 'generic_comment', diff --git a/actions/comments/delete.php b/actions/comments/delete.php index d0f5c7b84..54eb97077 100644 --- a/actions/comments/delete.php +++ b/actions/comments/delete.php @@ -6,7 +6,7 @@ */ // Ensure we're logged in -if (!isloggedin()) { +if (!elgg_is_logged_in()) { forward(); } diff --git a/actions/email/save.php b/actions/email/save.php index 13bc14d65..d0ce4571b 100644 --- a/actions/email/save.php +++ b/actions/email/save.php @@ -10,7 +10,7 @@ $email = get_input('email'); $user_id = get_input('guid'); if (!$user_id) { - $user = get_loggedin_user(); + $user = elgg_get_logged_in_user_entity(); } else { $user = get_entity($user_id); } diff --git a/actions/friends/add.php b/actions/friends/add.php index e6fa5b62e..53e4971d4 100644 --- a/actions/friends/add.php +++ b/actions/friends/add.php @@ -14,7 +14,7 @@ $errors = false; // Get the user try { - if (!get_loggedin_user()->addFriend($friend_guid)) { + if (!elgg_get_logged_in_user_entity()->addFriend($friend_guid)) { $errors = true; } } catch (Exception $e) { @@ -23,7 +23,7 @@ try { } if (!$errors) { // add to river - add_to_river('friends/river/create', 'friend', get_loggedin_userid(), $friend_guid); + add_to_river('friends/river/create', 'friend', elgg_get_logged_in_user_guid(), $friend_guid); system_message(elgg_echo("friends:add:successful", array($friend->name))); } diff --git a/actions/friends/addcollection.php b/actions/friends/addcollection.php index 92c78a2c1..eac8bced8 100644 --- a/actions/friends/addcollection.php +++ b/actions/friends/addcollection.php @@ -13,7 +13,7 @@ $friends = get_input('friends_collection'); if ($collection_name) { //create the collection - $create_collection = create_access_collection($collection_name, get_loggedin_userid()); + $create_collection = create_access_collection($collection_name, elgg_get_logged_in_user_guid()); //if the collection was created and the user passed some friends from the form, add them if ($create_collection && (!empty($friends))) { @@ -26,7 +26,7 @@ if ($collection_name) { // Success message system_message(elgg_echo("friends:collectionadded")); // Forward to the collections page - forward("pg/collections/" . get_loggedin_user()->username); + forward("pg/collections/" . elgg_get_logged_in_user_entity()->username); } else { register_error(elgg_echo("friends:nocollectionname")); diff --git a/actions/friends/deletecollection.php b/actions/friends/deletecollection.php index 1c3d878a1..f0ceaf023 100644 --- a/actions/friends/deletecollection.php +++ b/actions/friends/deletecollection.php @@ -13,7 +13,7 @@ $get_collection = get_access_collection($collection_id); if ($get_collection) { - if ($get_collection->owner_guid == get_loggedin_userid()) { + if ($get_collection->owner_guid == elgg_get_logged_in_user_guid()) { $delete_collection = delete_access_collection($collection_id); @@ -33,4 +33,4 @@ if ($get_collection) { } // Forward to the collections page -forward("pg/collections/" . get_loggedin_user()->username); +forward("pg/collections/" . elgg_get_logged_in_user_entity()->username); diff --git a/actions/friends/remove.php b/actions/friends/remove.php index 0a43c95bc..d69d18f31 100644 --- a/actions/friends/remove.php +++ b/actions/friends/remove.php @@ -14,7 +14,7 @@ $errors = false; // Get the user try{ if ($friend instanceof ElggUser) { - get_loggedin_user()->removeFriend($friend_guid); + elgg_get_logged_in_user_entity()->removeFriend($friend_guid); } else { register_error(elgg_echo("friends:remove:failure", array($friend->name))); $errors = true; diff --git a/actions/likes/add.php b/actions/likes/add.php index 9abe0b60e..a59ccae2b 100644 --- a/actions/likes/add.php +++ b/actions/likes/add.php @@ -21,12 +21,12 @@ if (!$entity) { } // cannot like your own stuff -if (get_loggedin_userid() == $entity->getOwnerGUID()) { +if (elgg_get_logged_in_user_guid() == $entity->getOwnerGUID()) { register_error(elgg_echo("likes:no_self_like")); forward(REFERER); } -$user = get_loggedin_user(); +$user = elgg_get_logged_in_user_entity(); $annotation = create_annotation($entity->guid, 'likes', "likes", diff --git a/actions/likes/delete.php b/actions/likes/delete.php index 7ccf2de37..168818a60 100644 --- a/actions/likes/delete.php +++ b/actions/likes/delete.php @@ -7,7 +7,7 @@ */ // Ensure we're logged in -if (!isloggedin()) { +if (!elgg_is_logged_in()) { forward(); } diff --git a/actions/notifications/settings/usersettings/save.php b/actions/notifications/settings/usersettings/save.php index eaa01c3ad..455a444e1 100644 --- a/actions/notifications/settings/usersettings/save.php +++ b/actions/notifications/settings/usersettings/save.php @@ -17,7 +17,7 @@ foreach ($method as $k => $v) { continue; } - $result = set_user_notification_setting(get_loggedin_userid(), $k, ($v == 'yes') ? true : false); + $result = set_user_notification_setting(elgg_get_logged_in_user_guid(), $k, ($v == 'yes') ? true : false); if (!$result) { register_error(elgg_echo('notifications:usersettings:save:fail')); diff --git a/actions/plugins/usersettings/save.php b/actions/plugins/usersettings/save.php index ddf7e822e..a54df627a 100644 --- a/actions/plugins/usersettings/save.php +++ b/actions/plugins/usersettings/save.php @@ -13,7 +13,7 @@ $result = false; foreach ($params as $k => $v) { // Save - $result = set_plugin_usersetting($k, $v, get_loggedin_userid(), $plugin); + $result = set_plugin_usersetting($k, $v, elgg_get_logged_in_user_guid(), $plugin); // Error? if (!$result) { diff --git a/actions/user/default_access.php b/actions/user/default_access.php index 0b7d0bfbd..5ddd86296 100644 --- a/actions/user/default_access.php +++ b/actions/user/default_access.php @@ -11,7 +11,7 @@ if (elgg_get_config('allow_user_default_access')) { $user_id = get_input('guid'); if (!$user_id) { - $user = get_loggedin_user(); + $user = elgg_get_logged_in_user_entity(); } else { $user = get_entity($user_id); } diff --git a/actions/user/language.php b/actions/user/language.php index 44c591d7a..30d3b45e8 100644 --- a/actions/user/language.php +++ b/actions/user/language.php @@ -10,7 +10,7 @@ $language = get_input('language'); $user_id = get_input('guid'); if (!$user_id) { - $user = get_loggedin_user(); + $user = elgg_get_logged_in_user_entity(); } else { $user = get_entity($user_id); } diff --git a/actions/user/name.php b/actions/user/name.php index e293d409c..881019e86 100644 --- a/actions/user/name.php +++ b/actions/user/name.php @@ -10,7 +10,7 @@ $name = strip_tags(get_input('name')); $user_id = get_input('guid'); if (!$user_id) { - $user = get_loggedin_user(); + $user = elgg_get_logged_in_user_entity(); } else { $user = get_entity($user_id); } diff --git a/actions/user/password.php b/actions/user/password.php index bbeb0ea7f..8619372e4 100644 --- a/actions/user/password.php +++ b/actions/user/password.php @@ -12,14 +12,14 @@ $password2 = get_input('password2'); $user_id = get_input('guid'); if (!$user_id) { - $user = get_loggedin_user(); + $user = elgg_get_logged_in_user_entity(); } else { $user = get_entity($user_id); } if (($user) && ($password != "")) { // let admin user change anyone's password without knowing it except his own. - if (!isadminloggedin() || isadminloggedin() && $user->guid == get_loggedin_userid()) { + if (!elgg_is_admin_logged_in() || elgg_is_admin_logged_in() && $user->guid == elgg_get_logged_in_user_guid()) { $credentials = array( 'username' => $user->username, 'password' => $current_password diff --git a/actions/user/spotlight.php b/actions/user/spotlight.php index 390197e78..202dde387 100644 --- a/actions/user/spotlight.php +++ b/actions/user/spotlight.php @@ -14,6 +14,6 @@ if ($closed != 'true') { $closed = true; } -get_loggedin_user()->spotlightclosed = $closed; +elgg_get_logged_in_user_entity()->spotlightclosed = $closed; // exit as this action is called through Ajax exit;
\ No newline at end of file diff --git a/actions/useradd.php b/actions/useradd.php index 0219361fb..f20b9d070 100644 --- a/actions/useradd.php +++ b/actions/useradd.php @@ -29,7 +29,7 @@ try { } $new_user->admin_created = TRUE; - $new_user->created_by_guid = get_loggedin_userid(); + $new_user->created_by_guid = elgg_get_logged_in_user_guid(); $subject = elgg_echo('useradd:subject'); $body = elgg_echo('useradd:body', array( diff --git a/actions/widgets/delete.php b/actions/widgets/delete.php index 167324b0c..5b8aaf75e 100644 --- a/actions/widgets/delete.php +++ b/actions/widgets/delete.php @@ -8,7 +8,7 @@ $guid = get_input('guid'); -$user = get_loggedin_user(); +$user = elgg_get_logged_in_user_entity(); $widget = get_entity($guid); if ($widget && $user->canEdit() && $widget->delete()) { diff --git a/actions/widgets/move.php b/actions/widgets/move.php index 276dcb55e..2edc7912e 100644 --- a/actions/widgets/move.php +++ b/actions/widgets/move.php @@ -10,7 +10,7 @@ $guid = get_input('guid'); $column = get_input('column', 1); $position = get_input('position'); -$user = get_loggedin_user(); +$user = elgg_get_logged_in_user_entity(); $widget = get_entity($guid); if ($widget && $user->canEdit()) { |