aboutsummaryrefslogtreecommitdiff
path: root/mod/messages/start.php
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-30 21:32:54 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-30 21:32:54 +0000
commitf49fdf4e1c80fe5bde922c25bdd6ca0e2c912ddb (patch)
treeeb2fdb272ba76e83af60378d05602a26a265be36 /mod/messages/start.php
parent9ebb6cff1cf22d4fb708c4ced37604c6cf5bbfae (diff)
downloadelgg-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/messages/start.php')
-rw-r--r--mod/messages/start.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/mod/messages/start.php b/mod/messages/start.php
index bd8d0680e..a340169c1 100644
--- a/mod/messages/start.php
+++ b/mod/messages/start.php
@@ -114,7 +114,7 @@ function messages_notification_msg($hook_name, $entity_type, $return_value, $par
strip_tags($parameters['entity']->description),
$CONFIG->wwwroot . "pg/messages/" . $user->username,
get_loggedin_user()->name,
- $CONFIG->wwwroot . "mod/messages/send.php?send_to=" . get_loggedin_user()->guid
+ $CONFIG->wwwroot . "mod/messages/send.php?send_to=" . get_loggedin_userid()
);
} else if ($parameters['method'] == 'site') return false;*/
}
@@ -165,7 +165,7 @@ function messages_send($subject, $body, $send_to, $from = 0, $reply = 0, $notify
// If $from == 0, set to current user
if ($from == 0)
- $from = (int) get_loggedin_user()->guid;
+ $from = (int) get_loggedin_userid();
// Initialise a new ElggObject
$message_to = new ElggObject();
@@ -174,7 +174,7 @@ function messages_send($subject, $body, $send_to, $from = 0, $reply = 0, $notify
$message_to->subtype = "messages";
$message_sent->subtype = "messages";
// Set its owner to the current user
- // $message_to->owner_guid = $_SESSION['user']->getGUID();
+ // $message_to->owner_guid = get_loggedin_userid();
$message_to->owner_guid = $send_to;
$message_to->container_guid = $send_to;
$message_sent->owner_guid = $from;
@@ -226,14 +226,14 @@ function messages_send($subject, $body, $send_to, $from = 0, $reply = 0, $notify
global $CONFIG;
$message_contents = strip_tags($body);
if ($send_to != get_loggedin_user() && $notify)
- notify_user($send_to, get_loggedin_user()->guid, elgg_echo('messages:email:subject'),
+ notify_user($send_to, get_loggedin_userid(), elgg_echo('messages:email:subject'),
sprintf(
elgg_echo('messages:email:body'),
get_loggedin_user()->name,
$message_contents,
$CONFIG->wwwroot . "pg/messages/" . $user->username,
get_loggedin_user()->name,
- $CONFIG->wwwroot . "mod/messages/send.php?send_to=" . get_loggedin_user()->guid
+ $CONFIG->wwwroot . "mod/messages/send.php?send_to=" . get_loggedin_userid()
)
);
@@ -284,7 +284,7 @@ function messages_url($message) {
function count_unread_messages() {
//get the users inbox messages
- //$num_messages = get_entities_from_metadata("toId", $_SESSION['user']->getGUID(), "object", "messages", 0, 10, 0, "", 0, false);
+ //$num_messages = get_entities_from_metadata("toId", get_loggedin_userid(), "object", "messages", 0, 10, 0, "", 0, false);
$num_messages = elgg_get_entities_from_metadata(array('metadata_name_value_pairs' => array(
'toId' => get_loggedin_userid(),
'readYet' => 0,