aboutsummaryrefslogtreecommitdiff
path: root/actions/friends/add.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-08-22 22:37:30 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-08-22 22:37:30 +0000
commitca08eb6d170d375ef4fca53604956f3474c7db19 (patch)
treea1e96c6b0ae322fab93373a66e1951e2b3b9be48 /actions/friends/add.php
parentbe37104ac63cd25f2eac831ca03d6d2b19976e1c (diff)
downloadelgg-ca08eb6d170d375ef4fca53604956f3474c7db19.tar.gz
elgg-ca08eb6d170d375ef4fca53604956f3474c7db19.tar.bz2
Merged r6701:6756 from 1.7 branch into trunk
git-svn-id: http://code.elgg.org/elgg/trunk@6849 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions/friends/add.php')
-rw-r--r--actions/friends/add.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/actions/friends/add.php b/actions/friends/add.php
index 934424b57..345a86774 100644
--- a/actions/friends/add.php
+++ b/actions/friends/add.php
@@ -19,7 +19,7 @@ $errors = false;
// Get the user
try {
- if (!$_SESSION['user']->addFriend($friend_guid)) {
+ if (!get_loggedin_user()->addFriend($friend_guid)) {
$errors = true;
}
} catch (Exception $e) {
@@ -28,7 +28,7 @@ try {
}
if (!$errors){
// add to river
- add_to_river('friends/river/create','friend',$_SESSION['user']->guid,$friend_guid);
+ add_to_river('friends/river/create','friend',get_loggedin_userid(),$friend_guid);
system_message(sprintf(elgg_echo("friends:add:successful"),$friend->name));
}