aboutsummaryrefslogtreecommitdiff
path: root/mod/messageboard
diff options
context:
space:
mode:
Diffstat (limited to 'mod/messageboard')
-rw-r--r--mod/messageboard/actions/add.php2
-rw-r--r--mod/messageboard/ajax_endpoint/load.php2
-rw-r--r--mod/messageboard/history.php2
-rw-r--r--mod/messageboard/index.php2
-rw-r--r--mod/messageboard/views/default/messageboard/messageboard_content.php2
-rw-r--r--mod/messageboard/views/default/widgets/messageboard/content.php4
6 files changed, 7 insertions, 7 deletions
diff --git a/mod/messageboard/actions/add.php b/mod/messageboard/actions/add.php
index 77f638bb1..1058482d9 100644
--- a/mod/messageboard/actions/add.php
+++ b/mod/messageboard/actions/add.php
@@ -14,7 +14,7 @@ $user = get_entity($page_owner); // the message board owner's details
// Let's see if we can get a user entity from the specified page_owner
if ($user && !empty($message_content)) {
- if (messageboard_add(get_loggedin_user(), $user, $message_content, $user->access_id)) {
+ if (messageboard_add(elgg_get_logged_in_user_entity(), $user, $message_content, $user->access_id)) {
system_message(elgg_echo("messageboard:posted"));
} else {
register_error(elgg_echo("messageboard:failure"));
diff --git a/mod/messageboard/ajax_endpoint/load.php b/mod/messageboard/ajax_endpoint/load.php
index 008c6fe0f..4509c30ef 100644
--- a/mod/messageboard/ajax_endpoint/load.php
+++ b/mod/messageboard/ajax_endpoint/load.php
@@ -21,7 +21,7 @@ $user = get_entity(get_input('pageOwner'));
//stage one - if a message was posted, add it as an annotation
if ($message) {
- if (!messageboard_add(get_loggedin_user(), $user, $message, $user->access_id)) {
+ if (!messageboard_add(elgg_get_logged_in_user_entity(), $user, $message, $user->access_id)) {
echo elgg_echo("messageboard:failure");
}
diff --git a/mod/messageboard/history.php b/mod/messageboard/history.php
index ca0584ccc..648e45a78 100644
--- a/mod/messageboard/history.php
+++ b/mod/messageboard/history.php
@@ -11,7 +11,7 @@
require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
// Get the user who is the owner of the message board
-$current_user = get_loggedin_userid();
+$current_user = elgg_get_logged_in_user_guid();
// this is the user how has posted on your messageboard that you want to display your history with
$history_user = get_input('user');
diff --git a/mod/messageboard/index.php b/mod/messageboard/index.php
index c6d6bed7a..102959e24 100644
--- a/mod/messageboard/index.php
+++ b/mod/messageboard/index.php
@@ -20,7 +20,7 @@ $contents = $entity->getAnnotations('messageboard', 50, 0, 'desc');
$area2 = elgg_view_title(elgg_echo('messageboard:board'));
// only display the add form and board to logged in users
-if (isloggedin()) {
+if (elgg_is_logged_in()) {
$area2 .= elgg_view("messageboard/forms/add");
$area2 .= elgg_view("messageboard/messageboard", array('annotation' => $contents));
}
diff --git a/mod/messageboard/views/default/messageboard/messageboard_content.php b/mod/messageboard/views/default/messageboard/messageboard_content.php
index b6307f33b..abd81d0ad 100644
--- a/mod/messageboard/views/default/messageboard/messageboard_content.php
+++ b/mod/messageboard/views/default/messageboard/messageboard_content.php
@@ -43,7 +43,7 @@
<?php
// If the message being looked at is owned by the current user, don't show the reply
// Also do not show if the user is not logged in
- if (isloggedin() && $vars['annotation']->owner_guid != get_loggedin_userid()) {
+ if (elgg_is_logged_in() && $vars['annotation']->owner_guid != elgg_get_logged_in_user_guid()) {
//get the message owner
$msg_owner = get_entity($vars['annotation']->owner_guid);
diff --git a/mod/messageboard/views/default/widgets/messageboard/content.php b/mod/messageboard/views/default/widgets/messageboard/content.php
index 71315a526..a81a99b44 100644
--- a/mod/messageboard/views/default/widgets/messageboard/content.php
+++ b/mod/messageboard/views/default/widgets/messageboard/content.php
@@ -17,7 +17,7 @@ if (isset($vars['entity']->num_display)) {
}
//Just the loggedin user can post messages
-if (isloggedin()) {
+if (elgg_is_logged_in()) {
?>
<script type="text/javascript">
$(document).ready(function(){
@@ -62,7 +62,7 @@ if (isloggedin()) {
</div><!-- end of mb_input_wrapper div -->
<?php
-} // if(isloggedin())
+} // if(elgg_is_logged_in())
//this for the first time the page loads, grab the latest messages.
$contents = $user->getAnnotations('messageboard', $num_display, 0, 'desc');