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/pages/actions/pages/edit.php | |
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/pages/actions/pages/edit.php')
-rw-r--r-- | mod/pages/actions/pages/edit.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mod/pages/actions/pages/edit.php b/mod/pages/actions/pages/edit.php index 396dd7e42..db308b5d7 100644 --- a/mod/pages/actions/pages/edit.php +++ b/mod/pages/actions/pages/edit.php @@ -49,7 +49,7 @@ if ($pages_guid) { } // New instance, so set container_guid - $container_guid = get_input('container_guid', $_SESSION['user']->getGUID()); + $container_guid = get_input('container_guid', get_loggedin_userid()); $page->container_guid = $container_guid; // cache data in session in case data from form does not validate @@ -77,7 +77,7 @@ if ($page instanceof ElggObject) { $page->access_id = (int)get_input('access_id', ACCESS_PRIVATE); $page->write_access_id = (int)get_input('write_access_id', ACCESS_PRIVATE); $page->parent_guid = $parent_guid; - $page->owner_guid = ($page->owner_guid ? $page->owner_guid : $_SESSION['user']->guid); + $page->owner_guid = ($page->owner_guid ? $page->owner_guid : get_loggedin_userid()); if ($page->save()) { @@ -94,9 +94,9 @@ if ($page instanceof ElggObject) { //add to river if ($which_river == 'new') { - add_to_river('river/object/page/create','create',$_SESSION['user']->guid,$page->guid); + add_to_river('river/object/page/create','create',get_loggedin_userid(),$page->guid); } else { - add_to_river('river/object/page/update','update',$_SESSION['user']->guid,$page->guid); + add_to_river('river/object/page/update','update',get_loggedin_userid(),$page->guid); } // Forward to the user's profile |