aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-30 22:04:16 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-30 22:04:16 +0000
commit42d890455ae7b6a61a566d174f9980b8faee782f (patch)
treef5da4e9c5cb9e2656dbbde06ba35dd9dc4d333d4
parentba5681722bbb3df247cda8eb3f64c7e040e5bf00 (diff)
downloadelgg-42d890455ae7b6a61a566d174f9980b8faee782f.tar.gz
elgg-42d890455ae7b6a61a566d174f9980b8faee782f.tar.bz2
Replaced $_SESSION['id'] and $_SESSION['guid'] with get_loggedin_userid()
git-svn-id: http://code.elgg.org/elgg/trunk@7143 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--mod/defaultwidgets/views/default/admin/appearance/default_dashboard_widgets.php2
-rw-r--r--mod/defaultwidgets/views/default/admin/appearance/default_profile_widgets.php2
-rw-r--r--mod/file/search.php2
-rw-r--r--mod/file/world.php2
-rw-r--r--mod/groups/actions/leave.php2
-rw-r--r--mod/pages/world.php2
-rwxr-xr-xmod/profile/views/default/profile/admin_menu.php2
-rw-r--r--mod/profile/views/default/profile/commentwall/commentwalladd.php2
-rw-r--r--mod/profile/views/default/profile/icon.php2
-rw-r--r--mod/profile/views/default/profile/menu/adminlinks.php2
-rw-r--r--mod/thewire/index.php2
-rw-r--r--mod/thewire/start.php2
12 files changed, 12 insertions, 12 deletions
diff --git a/mod/defaultwidgets/views/default/admin/appearance/default_dashboard_widgets.php b/mod/defaultwidgets/views/default/admin/appearance/default_dashboard_widgets.php
index 6efcd5b51..b6cc010df 100644
--- a/mod/defaultwidgets/views/default/admin/appearance/default_dashboard_widgets.php
+++ b/mod/defaultwidgets/views/default/admin/appearance/default_dashboard_widgets.php
@@ -7,7 +7,7 @@
**/
// Set admin user for user block
-set_page_owner($_SESSION['guid']);
+set_page_owner(get_loggedin_userid());
// create the view
$time = time();
diff --git a/mod/defaultwidgets/views/default/admin/appearance/default_profile_widgets.php b/mod/defaultwidgets/views/default/admin/appearance/default_profile_widgets.php
index 2abbf02e4..bb1f3fbe0 100644
--- a/mod/defaultwidgets/views/default/admin/appearance/default_profile_widgets.php
+++ b/mod/defaultwidgets/views/default/admin/appearance/default_profile_widgets.php
@@ -7,7 +7,7 @@
**/
// set admin user for user block
-set_page_owner($_SESSION['guid']);
+set_page_owner(get_loggedin_userid());
// create the view
$time = time();
diff --git a/mod/file/search.php b/mod/file/search.php
index 9279129a8..221e34079 100644
--- a/mod/file/search.php
+++ b/mod/file/search.php
@@ -53,7 +53,7 @@
if (is_array($owner_guid)) {
//$area2 = elgg_view_title(elgg_echo("file:friends:type:" . $tag));
$area2 = elgg_view('page_elements/content_header', array('context' => "friends", 'type' => 'file'));
- } else if (elgg_get_page_owner_guid() && elgg_get_page_owner_guid() != $_SESSION['guid']) {
+ } else if (elgg_get_page_owner_guid() && elgg_get_page_owner_guid() != get_loggedin_userid()) {
//$area2 = elgg_view_title(sprintf(elgg_echo("file:user:type:" . $tag),elgg_get_page_owner()->name));
$area2 = elgg_view('page_elements/content_header', array('context' => "mine", 'type' => 'file'));
} else{
diff --git a/mod/file/world.php b/mod/file/world.php
index 2bc24bd66..e35b3c067 100644
--- a/mod/file/world.php
+++ b/mod/file/world.php
@@ -14,7 +14,7 @@
$page_owner = elgg_get_page_owner();
if ($page_owner === false || is_null($page_owner)) {
$page_owner = get_loggedin_user();
- set_page_owner($_SESSION['guid']);
+ set_page_owner(get_loggedin_userid());
}
$title = elgg_echo('file:all');
diff --git a/mod/groups/actions/leave.php b/mod/groups/actions/leave.php
index 58f2655ad..220a106cf 100644
--- a/mod/groups/actions/leave.php
+++ b/mod/groups/actions/leave.php
@@ -24,7 +24,7 @@
if (($user instanceof ElggUser) && ($group instanceof ElggGroup))
{
- if ($group->getOwner() != $_SESSION['guid']) {
+ if ($group->getOwner() != get_loggedin_userid()) {
if ($group->leave($user))
system_message(elgg_echo("groups:left"));
else
diff --git a/mod/pages/world.php b/mod/pages/world.php
index 0b411b8b2..f00fb3acd 100644
--- a/mod/pages/world.php
+++ b/mod/pages/world.php
@@ -13,7 +13,7 @@ global $CONFIG;
$page_owner = elgg_get_page_owner();
if ($page_owner === false || is_null($page_owner)) {
$page_owner = get_loggedin_user();
- set_page_owner($_SESSION['guid']);
+ set_page_owner(get_loggedin_userid());
}
if (($page_owner instanceof ElggEntity) && ($page_owner->canWriteToContainer())){
diff --git a/mod/profile/views/default/profile/admin_menu.php b/mod/profile/views/default/profile/admin_menu.php
index a896a0ace..e901442c2 100755
--- a/mod/profile/views/default/profile/admin_menu.php
+++ b/mod/profile/views/default/profile/admin_menu.php
@@ -5,7 +5,7 @@
global $CONFIG;
if (isadminloggedin()){
- if ($_SESSION['id']!=elgg_get_page_owner_guid()){
+ if (get_loggedin_userid()!=elgg_get_page_owner_guid()){
$user = get_user(elgg_get_page_owner_guid());
$url = $vars['url'];
$ts = time();
diff --git a/mod/profile/views/default/profile/commentwall/commentwalladd.php b/mod/profile/views/default/profile/commentwall/commentwalladd.php
index 0491925c6..a5765082c 100644
--- a/mod/profile/views/default/profile/commentwall/commentwalladd.php
+++ b/mod/profile/views/default/profile/commentwall/commentwalladd.php
@@ -8,7 +8,7 @@
<!-- textarea for the contents -->
<textarea name="message_content" value="" class="commentwall"></textarea><br />
<!-- the person posting an item on the message board -->
- <input type="hidden" name="guid" value="<?php echo $_SESSION['guid']; ?>" />
+ <input type="hidden" name="guid" value="<?php echo get_loggedin_userid(); ?>" />
<!-- the page owner, this will be the profile owner -->
<input type="hidden" name="pageOwner" value="<?php echo elgg_get_page_owner_guid(); ?>" />
<?php echo elgg_view('input/securitytoken'); ?>
diff --git a/mod/profile/views/default/profile/icon.php b/mod/profile/views/default/profile/icon.php
index 1423070d4..82404676e 100644
--- a/mod/profile/views/default/profile/icon.php
+++ b/mod/profile/views/default/profile/icon.php
@@ -76,7 +76,7 @@ if ($vars['entity'] instanceof ElggUser) {
}
// if Admin is logged in, and not looking at admins own avatar menu
- if (isadminloggedin() && ($_SESSION['id']!=$vars['entity']->guid) ){
+ if (isadminloggedin() && (get_loggedin_userid()!=$vars['entity']->guid) ){
$adminlinks = elgg_view('profile/menu/adminlinks', $vars);
if (!empty($adminlinks)) {
echo "<li class='user_menu_admin'>{$adminlinks}</li>";
diff --git a/mod/profile/views/default/profile/menu/adminlinks.php b/mod/profile/views/default/profile/menu/adminlinks.php
index 807fa1034..6d99613ea 100644
--- a/mod/profile/views/default/profile/menu/adminlinks.php
+++ b/mod/profile/views/default/profile/menu/adminlinks.php
@@ -8,7 +8,7 @@
*/
if (isadminloggedin()){
- if ($_SESSION['id']!=$vars['entity']->guid){
+ if (get_loggedin_userid()!=$vars['entity']->guid){
?>
<a href="<?php echo $vars['url']; ?>pg/settings/user/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo('profile:editdetails'); ?></a>
<?php
diff --git a/mod/thewire/index.php b/mod/thewire/index.php
index a0bc1757d..61eb9ef4a 100644
--- a/mod/thewire/index.php
+++ b/mod/thewire/index.php
@@ -17,7 +17,7 @@
}
// title
- if (elgg_get_page_owner_guid() == $_SESSION['guid']) {
+ if (elgg_get_page_owner_guid() == get_loggedin_userid()) {
$area2 = elgg_view_title(elgg_echo("thewire:read"));
} else {
$area2 = elgg_view_title(sprintf(elgg_echo("thewire:user"),$page_owner->name));
diff --git a/mod/thewire/start.php b/mod/thewire/start.php
index 097d74001..c47e17d5c 100644
--- a/mod/thewire/start.php
+++ b/mod/thewire/start.php
@@ -60,7 +60,7 @@
//add submenu options
if (get_context() == "thewire") {
- if ((elgg_get_page_owner_guid() == $_SESSION['guid'] || !elgg_get_page_owner_guid()) && isloggedin()) {
+ if ((elgg_get_page_owner_guid() == get_loggedin_userid() || !elgg_get_page_owner_guid()) && isloggedin()) {
add_submenu_item(elgg_echo('thewire:read'),$CONFIG->wwwroot."pg/thewire/" . get_loggedin_user()->username);
add_submenu_item(elgg_echo('thewire:everyone'),$CONFIG->wwwroot."mod/thewire/everyone.php");
//add_submenu_item(elgg_echo('thewire:add'),$CONFIG->wwwroot."mod/thewire/add.php");