diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-30 21:32:54 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-30 21:32:54 +0000 |
commit | f49fdf4e1c80fe5bde922c25bdd6ca0e2c912ddb (patch) | |
tree | eb2fdb272ba76e83af60378d05602a26a265be36 /mod/profile/actions | |
parent | 9ebb6cff1cf22d4fb708c4ced37604c6cf5bbfae (diff) | |
download | elgg-f49fdf4e1c80fe5bde922c25bdd6ca0e2c912ddb.tar.gz elgg-f49fdf4e1c80fe5bde922c25bdd6ca0e2c912ddb.tar.bz2 |
Refs #2124: Using get_loggedin_user functions instead of $vars['user'], $_SESSION['user'], etc.
git-svn-id: http://code.elgg.org/elgg/trunk@7139 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/profile/actions')
-rw-r--r-- | mod/profile/actions/addcomment.php | 14 | ||||
-rw-r--r-- | mod/profile/actions/edit.php | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/mod/profile/actions/addcomment.php b/mod/profile/actions/addcomment.php index 5850efe25..0e241db0a 100644 --- a/mod/profile/actions/addcomment.php +++ b/mod/profile/actions/addcomment.php @@ -16,25 +16,25 @@ $user = get_entity($page_owner); // the commentwall owner details if ($user && !empty($message_content)) { // If posting the comment was successful, say so - if ($user->annotate('commentwall',$message_content,$user->access_id, $_SESSION['user']->getGUID())) { + if ($user->annotate('commentwall',$message_content,$user->access_id, get_loggedin_userid())) { global $CONFIG; - if ($user->getGUID() != $_SESSION['user']->getGUID()) - notify_user($user->getGUID(), $_SESSION['user']->getGUID(), elgg_echo('profile:comment:subject'), + if ($user->getGUID() != get_loggedin_userid()) + notify_user($user->getGUID(), get_loggedin_userid(), elgg_echo('profile:comment:subject'), sprintf( elgg_echo('profile:comment:body'), - $_SESSION['user']->name, + get_loggedin_user()->name, $message_content, $CONFIG->wwwroot . "pg/profile/" . $user->username, - $_SESSION['user']->name, - $_SESSION['user']->getURL() + get_loggedin_user()->name, + get_loggedin_user()->getURL() ) ); system_message(elgg_echo("profile:commentwall:posted")); // add to river - add_to_river('river/object/profile/commentwall/create','commentwall',$_SESSION['user']->guid,$user->guid); + add_to_river('river/object/profile/commentwall/create','commentwall',get_loggedin_userid(),$user->guid); } else { register_error(elgg_echo("profile:commentwall:failure")); diff --git a/mod/profile/actions/edit.php b/mod/profile/actions/edit.php index c21a43fbf..b9cc8e19d 100644 --- a/mod/profile/actions/edit.php +++ b/mod/profile/actions/edit.php @@ -102,7 +102,7 @@ if (sizeof($input) > 0) { //add to river if edited by self if (get_loggedin_userid() == $user->guid) { - add_to_river('river/user/default/profileupdate','update',$_SESSION['user']->guid,$_SESSION['user']->guid,get_default_access($_SESSION['user'])); + add_to_river('river/user/default/profileupdate','update',get_loggedin_userid(),get_loggedin_userid(),get_default_access(get_loggedin_user())); } system_message(elgg_echo("profile:saved")); |