aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-08 19:27:58 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-08 19:27:58 +0000
commit1368785a6b6f9c946dcc5eca078540bacce71f60 (patch)
tree1aa0857127ef2f21cc2e64a608d94359da172bab /engine
parent9074f002ad0603014c90b12aaaf2c51d740638e9 (diff)
downloadelgg-1368785a6b6f9c946dcc5eca078540bacce71f60.tar.gz
elgg-1368785a6b6f9c946dcc5eca078540bacce71f60.tar.bz2
Refs #2543: Core uses the new functions from previous commit.
git-svn-id: http://code.elgg.org/elgg/trunk@8078 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/classes/APIException.php2
-rw-r--r--engine/classes/CallException.php2
-rw-r--r--engine/classes/ClassNotFoundException.php2
-rw-r--r--engine/classes/CronException.php2
-rw-r--r--engine/classes/ElggAccess.php2
-rw-r--r--engine/classes/ElggAnnotation.php2
-rw-r--r--engine/classes/ElggCache.php2
-rw-r--r--engine/classes/ElggData.php2
-rw-r--r--engine/classes/ElggDiskFilestore.php4
-rw-r--r--engine/classes/ElggEntity.php8
-rw-r--r--engine/classes/ElggFileCache.php2
-rw-r--r--engine/classes/ElggFilestore.php2
-rw-r--r--engine/classes/ElggGroup.php4
-rw-r--r--engine/classes/ElggHMACCache.php2
-rw-r--r--engine/classes/ElggMetadata.php2
-rw-r--r--engine/classes/ElggObject.php2
-rw-r--r--engine/classes/ElggPlugin.php2
-rw-r--r--engine/classes/ElggPluginManifest.php2
-rw-r--r--engine/classes/ElggPluginManifestParser.php2
-rw-r--r--engine/classes/ElggPluginManifestParser17.php2
-rw-r--r--engine/classes/ElggPluginManifestParser18.php2
-rw-r--r--engine/classes/ElggPluginPackage.php2
-rw-r--r--engine/classes/ElggRelationship.php2
-rw-r--r--engine/classes/ElggSession.php2
-rw-r--r--engine/classes/ElggSharedMemoryCache.php2
-rw-r--r--engine/classes/ElggSite.php2
-rw-r--r--engine/classes/ElggStaticVariableCache.php2
-rw-r--r--engine/classes/ElggUser.php2
-rw-r--r--engine/classes/ElggWidget.php2
-rw-r--r--engine/classes/ErrorResult.php2
-rw-r--r--engine/classes/ExportException.php2
-rw-r--r--engine/classes/Exportable.php2
-rw-r--r--engine/classes/Friendable.php2
-rw-r--r--engine/classes/GenericResult.php2
-rw-r--r--engine/classes/ImportException.php2
-rw-r--r--engine/classes/Locatable.php2
-rw-r--r--engine/classes/Loggable.php2
-rw-r--r--engine/classes/LoginException.php2
-rw-r--r--engine/classes/Notable.php2
-rw-r--r--engine/classes/ODDEntity.php2
-rw-r--r--engine/classes/PluginException.php2
-rw-r--r--engine/classes/RegistrationException.php2
-rw-r--r--engine/classes/SuccessResult.php2
-rw-r--r--engine/classes/XMLRPCArrayParameter.php2
-rw-r--r--engine/classes/XMLRPCBase64Parameter.php2
-rw-r--r--engine/classes/XMLRPCBoolParameter.php2
-rw-r--r--engine/classes/XMLRPCCall.php2
-rw-r--r--engine/classes/XMLRPCDateParameter.php2
-rw-r--r--engine/classes/XMLRPCErrorResponse.php2
-rw-r--r--engine/classes/XMLRPCParameter.php2
-rw-r--r--engine/classes/XMLRPCResponse.php2
-rw-r--r--engine/classes/XMLRPCStructParameter.php2
-rw-r--r--engine/classes/XMLRPCSuccessResponse.php2
-rw-r--r--engine/classes/XmlElement.php2
-rw-r--r--engine/handlers/action_handler.php2
-rw-r--r--engine/handlers/export_handler.php2
-rw-r--r--engine/handlers/page_handler.php2
-rw-r--r--engine/handlers/service_handler.php2
-rw-r--r--engine/handlers/xml-rpc_handler.php2
-rw-r--r--engine/lib/access.php18
-rw-r--r--engine/lib/actions.php6
-rw-r--r--engine/lib/annotations.php6
-rw-r--r--engine/lib/calendar.php2
-rw-r--r--engine/lib/configuration.php2
-rw-r--r--engine/lib/cron.php2
-rw-r--r--engine/lib/database.php2
-rw-r--r--engine/lib/entities.php16
-rw-r--r--engine/lib/extender.php6
-rw-r--r--engine/lib/filestore.php2
-rw-r--r--engine/lib/group.php6
-rw-r--r--engine/lib/input.php2
-rw-r--r--engine/lib/languages.php6
-rw-r--r--engine/lib/mb_wrapper.php2
-rw-r--r--engine/lib/memcache.php2
-rw-r--r--engine/lib/metadata.php4
-rw-r--r--engine/lib/metastrings.php2
-rw-r--r--engine/lib/notification.php6
-rw-r--r--engine/lib/objects.php2
-rw-r--r--engine/lib/opendd.php2
-rw-r--r--engine/lib/pageowner.php2
-rw-r--r--engine/lib/pam.php2
-rw-r--r--engine/lib/plugins.php10
-rw-r--r--engine/lib/river.php2
-rw-r--r--engine/lib/sessions.php4
-rw-r--r--engine/lib/statistics.php2
-rw-r--r--engine/lib/system_log.php4
-rw-r--r--engine/lib/upgrades/2008100701.php2
-rw-r--r--engine/lib/upgrades/2009022701.php2
-rw-r--r--engine/lib/upgrades/2009041701.php2
-rw-r--r--engine/lib/upgrades/2009070101.php2
-rw-r--r--engine/lib/upgrades/2010033101.php2
-rw-r--r--engine/lib/upgrades/2010040201.php2
-rw-r--r--engine/lib/upgrades/2010061501.php2
-rw-r--r--engine/lib/upgrades/2010121401.php2
-rw-r--r--engine/lib/upgrades/2011010101.php2
-rw-r--r--engine/lib/users.php22
-rw-r--r--engine/lib/usersettings.php8
-rw-r--r--engine/lib/views.php8
-rw-r--r--engine/lib/web_services.php2
-rw-r--r--engine/lib/widgets.php6
-rw-r--r--engine/settings.example.php2
-rw-r--r--engine/tests/objects/entities.php4
-rw-r--r--engine/tests/objects/objects.php10
-rw-r--r--engine/tests/objects/sites.php4
-rw-r--r--engine/tests/objects/users.php10
-rw-r--r--engine/tests/ui/submenu.php2
106 files changed, 173 insertions, 173 deletions
diff --git a/engine/classes/APIException.php b/engine/classes/APIException.php
index 377538c36..b6e1c347b 100644
--- a/engine/classes/APIException.php
+++ b/engine/classes/APIException.php
@@ -8,4 +8,4 @@
* @package Elgg.Core
* @subpackage Exceptions.Stub
*/
-class APIException extends Exception {} \ No newline at end of file
+class APIException extends Exception {}
diff --git a/engine/classes/CallException.php b/engine/classes/CallException.php
index 02c580a52..22b8f14f5 100644
--- a/engine/classes/CallException.php
+++ b/engine/classes/CallException.php
@@ -7,4 +7,4 @@
* @package Elgg.Core
* @subpackage Exceptions.Stub
*/
-class CallException extends Exception {} \ No newline at end of file
+class CallException extends Exception {}
diff --git a/engine/classes/ClassNotFoundException.php b/engine/classes/ClassNotFoundException.php
index 5170b5333..6a9bcd327 100644
--- a/engine/classes/ClassNotFoundException.php
+++ b/engine/classes/ClassNotFoundException.php
@@ -7,4 +7,4 @@
* @package Elgg.Core
* @subpackage Exceptions
*/
-class ClassNotFoundException extends ClassException {} \ No newline at end of file
+class ClassNotFoundException extends ClassException {}
diff --git a/engine/classes/CronException.php b/engine/classes/CronException.php
index 3604c21b9..86370ef31 100644
--- a/engine/classes/CronException.php
+++ b/engine/classes/CronException.php
@@ -7,4 +7,4 @@
* @package Elgg
* @subpackage Exceptions.Stub
*/
-class CronException extends Exception {} \ No newline at end of file
+class CronException extends Exception {}
diff --git a/engine/classes/ElggAccess.php b/engine/classes/ElggAccess.php
index 68607962b..6f8d9bb4b 100644
--- a/engine/classes/ElggAccess.php
+++ b/engine/classes/ElggAccess.php
@@ -63,4 +63,4 @@ class ElggAccess {
return $prev;
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/ElggAnnotation.php b/engine/classes/ElggAnnotation.php
index 913d909c5..10f4269cf 100644
--- a/engine/classes/ElggAnnotation.php
+++ b/engine/classes/ElggAnnotation.php
@@ -104,4 +104,4 @@ class ElggAnnotation extends ElggExtender {
public function getObjectFromID($id) {
return get_annotation($id);
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/ElggCache.php b/engine/classes/ElggCache.php
index 549772d6d..2e697e0bb 100644
--- a/engine/classes/ElggCache.php
+++ b/engine/classes/ElggCache.php
@@ -239,4 +239,4 @@ abstract class ElggCache implements
function offsetExists($offset) {
return isset($this->$offset);
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/ElggData.php b/engine/classes/ElggData.php
index 5e1130349..3470ee1cf 100644
--- a/engine/classes/ElggData.php
+++ b/engine/classes/ElggData.php
@@ -302,4 +302,4 @@ abstract class ElggData implements
public function offsetExists($offset) {
return array_key_exists($offset, $this->attributes);
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/ElggDiskFilestore.php b/engine/classes/ElggDiskFilestore.php
index 774054842..11b2bd947 100644
--- a/engine/classes/ElggDiskFilestore.php
+++ b/engine/classes/ElggDiskFilestore.php
@@ -202,7 +202,7 @@ class ElggDiskFilestore extends ElggFilestore {
public function getFilenameOnFilestore(ElggFile $file) {
$owner = $file->getOwnerEntity();
if (!$owner) {
- $owner = get_loggedin_user();
+ $owner = elgg_get_logged_in_user_entity();
}
if ((!$owner) || (!$owner->username)) {
@@ -396,4 +396,4 @@ class ElggDiskFilestore extends ElggFilestore {
return false;
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/ElggEntity.php b/engine/classes/ElggEntity.php
index 13b08a122..cf716b37d 100644
--- a/engine/classes/ElggEntity.php
+++ b/engine/classes/ElggEntity.php
@@ -80,8 +80,8 @@ abstract class ElggEntity extends ElggData implements
$this->attributes['type'] = NULL;
$this->attributes['subtype'] = NULL;
- $this->attributes['owner_guid'] = get_loggedin_userid();
- $this->attributes['container_guid'] = get_loggedin_userid();
+ $this->attributes['owner_guid'] = elgg_get_logged_in_user_guid();
+ $this->attributes['container_guid'] = elgg_get_logged_in_user_guid();
$this->attributes['site_guid'] = NULL;
$this->attributes['access_id'] = ACCESS_PRIVATE;
@@ -1368,7 +1368,7 @@ abstract class ElggEntity extends ElggData implements
$this->attributes['subtype'] = $data->getAttribute('subclass');
// Set owner
- $this->attributes['owner_guid'] = get_loggedin_userid(); // Import as belonging to importer.
+ $this->attributes['owner_guid'] = elgg_get_logged_in_user_guid(); // Import as belonging to importer.
// Set time
$this->attributes['time_created'] = strtotime($data->getAttribute('published'));
@@ -1445,4 +1445,4 @@ abstract class ElggEntity extends ElggData implements
return $entity_tags;
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/ElggFileCache.php b/engine/classes/ElggFileCache.php
index c27e9aa32..8304372dc 100644
--- a/engine/classes/ElggFileCache.php
+++ b/engine/classes/ElggFileCache.php
@@ -208,4 +208,4 @@ class ElggFileCache extends ElggCache {
}
}
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/ElggFilestore.php b/engine/classes/ElggFilestore.php
index 61ce167d0..16430feac 100644
--- a/engine/classes/ElggFilestore.php
+++ b/engine/classes/ElggFilestore.php
@@ -136,4 +136,4 @@ abstract class ElggFilestore {
* @return bool
*/
abstract public function exists(ElggFile $file);
-} \ No newline at end of file
+}
diff --git a/engine/classes/ElggGroup.php b/engine/classes/ElggGroup.php
index 81c1db138..c709eb3a6 100644
--- a/engine/classes/ElggGroup.php
+++ b/engine/classes/ElggGroup.php
@@ -285,7 +285,7 @@ class ElggGroup extends ElggEntity
*/
public function isMember($user = 0) {
if (!($user instanceof ElggUser)) {
- $user = get_loggedin_user();
+ $user = elgg_get_logged_in_user_entity();
}
if (!($user instanceof ElggUser)) {
return false;
@@ -380,4 +380,4 @@ class ElggGroup extends ElggEntity
'description',
));
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/ElggHMACCache.php b/engine/classes/ElggHMACCache.php
index 8d994d013..c2f468815 100644
--- a/engine/classes/ElggHMACCache.php
+++ b/engine/classes/ElggHMACCache.php
@@ -96,4 +96,4 @@ class ElggHMACCache extends ElggCache {
delete_data("DELETE from {$CONFIG->dbprefix}hmac_cache where ts<$expires");
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/ElggMetadata.php b/engine/classes/ElggMetadata.php
index 12e458629..1c72b1bf0 100644
--- a/engine/classes/ElggMetadata.php
+++ b/engine/classes/ElggMetadata.php
@@ -106,4 +106,4 @@ class ElggMetadata extends ElggExtender {
public function getObjectFromID($id) {
return get_metadata($id);
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/ElggObject.php b/engine/classes/ElggObject.php
index 1d15bb305..c47cd217f 100644
--- a/engine/classes/ElggObject.php
+++ b/engine/classes/ElggObject.php
@@ -184,4 +184,4 @@ class ElggObject extends ElggEntity {
'description',
));
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/ElggPlugin.php b/engine/classes/ElggPlugin.php
index c682319e3..b82e92fba 100644
--- a/engine/classes/ElggPlugin.php
+++ b/engine/classes/ElggPlugin.php
@@ -818,4 +818,4 @@ class ElggPlugin extends ElggObject {
return remove_entity_relationship($this->guid, 'active_plugin', $site->guid);
}
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/ElggPluginManifest.php b/engine/classes/ElggPluginManifest.php
index bef099dcd..fcd0094c4 100644
--- a/engine/classes/ElggPluginManifest.php
+++ b/engine/classes/ElggPluginManifest.php
@@ -655,4 +655,4 @@ class ElggPluginManifest {
return $return;
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/ElggPluginManifestParser.php b/engine/classes/ElggPluginManifestParser.php
index dce46cbb4..b0480d4d8 100644
--- a/engine/classes/ElggPluginManifestParser.php
+++ b/engine/classes/ElggPluginManifestParser.php
@@ -99,4 +99,4 @@ abstract class ElggPluginManifestParser {
* @return bool
*/
abstract public function parse();
-} \ No newline at end of file
+}
diff --git a/engine/classes/ElggPluginManifestParser17.php b/engine/classes/ElggPluginManifestParser17.php
index 0ca2d6511..5658ee804 100644
--- a/engine/classes/ElggPluginManifestParser17.php
+++ b/engine/classes/ElggPluginManifestParser17.php
@@ -79,4 +79,4 @@ class ElggPluginManifestParser17 extends ElggPluginManifestParser {
return false;
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/ElggPluginManifestParser18.php b/engine/classes/ElggPluginManifestParser18.php
index c74b23e32..38734f6b4 100644
--- a/engine/classes/ElggPluginManifestParser18.php
+++ b/engine/classes/ElggPluginManifestParser18.php
@@ -94,4 +94,4 @@ class ElggPluginManifestParser18 extends ElggPluginManifestParser {
return true;
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/ElggPluginPackage.php b/engine/classes/ElggPluginPackage.php
index cc23dcf21..7b033a9d8 100644
--- a/engine/classes/ElggPluginPackage.php
+++ b/engine/classes/ElggPluginPackage.php
@@ -595,4 +595,4 @@ class ElggPluginPackage {
return $this->id;
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/ElggRelationship.php b/engine/classes/ElggRelationship.php
index 0faaf875e..31ef73adb 100644
--- a/engine/classes/ElggRelationship.php
+++ b/engine/classes/ElggRelationship.php
@@ -220,4 +220,4 @@ class ElggRelationship extends ElggData implements
return $this->relationship;
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/ElggSession.php b/engine/classes/ElggSession.php
index 8a3bed84a..13a33736c 100644
--- a/engine/classes/ElggSession.php
+++ b/engine/classes/ElggSession.php
@@ -148,4 +148,4 @@ class ElggSession implements ArrayAccess {
function del($key) {
return $this->offsetUnset($key);
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/ElggSharedMemoryCache.php b/engine/classes/ElggSharedMemoryCache.php
index 6d6a3d625..f5f11d2c7 100644
--- a/engine/classes/ElggSharedMemoryCache.php
+++ b/engine/classes/ElggSharedMemoryCache.php
@@ -37,4 +37,4 @@ abstract class ElggSharedMemoryCache extends ElggCache {
public function getNamespace() {
return $this->namespace;
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/ElggSite.php b/engine/classes/ElggSite.php
index 6ab6a9aef..0237421e0 100644
--- a/engine/classes/ElggSite.php
+++ b/engine/classes/ElggSite.php
@@ -357,7 +357,7 @@ class ElggSite extends ElggEntity {
public function checkWalledGarden() {
global $CONFIG;
- if ($CONFIG->walled_garden && !isloggedin()) {
+ if ($CONFIG->walled_garden && !elgg_is_logged_in()) {
// hook into the index system call at the highest priority
elgg_register_plugin_hook_handler('index', 'system', 'elgg_walled_garden_index', 1);
diff --git a/engine/classes/ElggStaticVariableCache.php b/engine/classes/ElggStaticVariableCache.php
index a846ab60f..787d35a32 100644
--- a/engine/classes/ElggStaticVariableCache.php
+++ b/engine/classes/ElggStaticVariableCache.php
@@ -93,4 +93,4 @@ class ElggStaticVariableCache extends ElggSharedMemoryCache {
ElggStaticVariableCache::$__cache[$namespace] = array();
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/ElggUser.php b/engine/classes/ElggUser.php
index 333792513..b2303c525 100644
--- a/engine/classes/ElggUser.php
+++ b/engine/classes/ElggUser.php
@@ -307,7 +307,7 @@ class ElggUser extends ElggEntity
* @return true|false
*/
function isFriend() {
- return $this->isFriendOf(get_loggedin_userid());
+ return $this->isFriendOf(elgg_get_logged_in_user_guid());
}
/**
diff --git a/engine/classes/ElggWidget.php b/engine/classes/ElggWidget.php
index dae61de68..0eb83913b 100644
--- a/engine/classes/ElggWidget.php
+++ b/engine/classes/ElggWidget.php
@@ -191,4 +191,4 @@ class ElggWidget extends ElggObject {
return true;
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/ErrorResult.php b/engine/classes/ErrorResult.php
index d4766b3d2..afad4c740 100644
--- a/engine/classes/ErrorResult.php
+++ b/engine/classes/ErrorResult.php
@@ -51,4 +51,4 @@ class ErrorResult extends GenericResult {
// Return a new error object.
return new ErrorResult($message, $code, $exception);
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/ExportException.php b/engine/classes/ExportException.php
index 11781d91b..ae8a8e41b 100644
--- a/engine/classes/ExportException.php
+++ b/engine/classes/ExportException.php
@@ -6,4 +6,4 @@
* @subpackage Exception
*
*/
-class ExportException extends DataFormatException {} \ No newline at end of file
+class ExportException extends DataFormatException {}
diff --git a/engine/classes/Exportable.php b/engine/classes/Exportable.php
index 1adcd781e..0c1ea5282 100644
--- a/engine/classes/Exportable.php
+++ b/engine/classes/Exportable.php
@@ -20,4 +20,4 @@ interface Exportable {
* @return array
*/
public function getExportableValues();
-} \ No newline at end of file
+}
diff --git a/engine/classes/Friendable.php b/engine/classes/Friendable.php
index 588f9ec5a..c308b4598 100644
--- a/engine/classes/Friendable.php
+++ b/engine/classes/Friendable.php
@@ -101,4 +101,4 @@ interface Friendable {
* @return int
*/
public function countObjects($subtype = "");
-} \ No newline at end of file
+}
diff --git a/engine/classes/GenericResult.php b/engine/classes/GenericResult.php
index bb8a7e76e..e42e924d1 100644
--- a/engine/classes/GenericResult.php
+++ b/engine/classes/GenericResult.php
@@ -122,4 +122,4 @@ abstract class GenericResult {
return $result;
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/ImportException.php b/engine/classes/ImportException.php
index 14287fdf2..909c599d5 100644
--- a/engine/classes/ImportException.php
+++ b/engine/classes/ImportException.php
@@ -5,4 +5,4 @@
* @package Elgg.Core
* @subpackage Exception
*/
-class ImportException extends DataFormatException {} \ No newline at end of file
+class ImportException extends DataFormatException {}
diff --git a/engine/classes/Locatable.php b/engine/classes/Locatable.php
index 980256cbb..0977dde99 100644
--- a/engine/classes/Locatable.php
+++ b/engine/classes/Locatable.php
@@ -46,4 +46,4 @@ interface Locatable {
* @return string
*/
public function getLocation();
-} \ No newline at end of file
+}
diff --git a/engine/classes/Loggable.php b/engine/classes/Loggable.php
index 40690f87a..b9e8bf26b 100644
--- a/engine/classes/Loggable.php
+++ b/engine/classes/Loggable.php
@@ -62,4 +62,4 @@ interface Loggable {
* @deprecated 1.8 Use getOwnerGUID() instead
*/
public function getObjectOwnerGUID();
-} \ No newline at end of file
+}
diff --git a/engine/classes/LoginException.php b/engine/classes/LoginException.php
index 9189a6afd..7546fa36f 100644
--- a/engine/classes/LoginException.php
+++ b/engine/classes/LoginException.php
@@ -7,4 +7,4 @@
* @package Elgg.Core
* @subpackage Exceptions.Stub
*/
-class LoginException extends Exception {} \ No newline at end of file
+class LoginException extends Exception {}
diff --git a/engine/classes/Notable.php b/engine/classes/Notable.php
index e36699dfc..0c21af27d 100644
--- a/engine/classes/Notable.php
+++ b/engine/classes/Notable.php
@@ -38,4 +38,4 @@ interface Notable {
* @return int
*/
public function getCalendarEndTime();
-} \ No newline at end of file
+}
diff --git a/engine/classes/ODDEntity.php b/engine/classes/ODDEntity.php
index acdfe2f71..ab3a49168 100644
--- a/engine/classes/ODDEntity.php
+++ b/engine/classes/ODDEntity.php
@@ -103,4 +103,4 @@ class ODDRelationship extends ODD {
protected function getTagName() {
return "relationship";
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/PluginException.php b/engine/classes/PluginException.php
index 56cf29596..a74303695 100644
--- a/engine/classes/PluginException.php
+++ b/engine/classes/PluginException.php
@@ -8,4 +8,4 @@
* @package Elgg.Core
* @subpackage Exception
*/
-class PluginException extends Exception {} \ No newline at end of file
+class PluginException extends Exception {}
diff --git a/engine/classes/RegistrationException.php b/engine/classes/RegistrationException.php
index 05af35a01..5246efc25 100644
--- a/engine/classes/RegistrationException.php
+++ b/engine/classes/RegistrationException.php
@@ -6,4 +6,4 @@
* @package Elgg.Core
* @subpackage Exceptions
*/
-class RegistrationException extends InstallationException {} \ No newline at end of file
+class RegistrationException extends InstallationException {}
diff --git a/engine/classes/SuccessResult.php b/engine/classes/SuccessResult.php
index f68ddd39e..c8578a2cf 100644
--- a/engine/classes/SuccessResult.php
+++ b/engine/classes/SuccessResult.php
@@ -31,4 +31,4 @@ class SuccessResult extends GenericResult {
// Return a new error object.
return new SuccessResult($result);
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/XMLRPCArrayParameter.php b/engine/classes/XMLRPCArrayParameter.php
index c0d358d5a..a8edccba7 100644
--- a/engine/classes/XMLRPCArrayParameter.php
+++ b/engine/classes/XMLRPCArrayParameter.php
@@ -53,4 +53,4 @@ class XMLRPCArrayParameter extends XMLRPCParameter
return "<array><data>$params</data></array>";
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/XMLRPCBase64Parameter.php b/engine/classes/XMLRPCBase64Parameter.php
index eb82b24a8..7db0a761c 100644
--- a/engine/classes/XMLRPCBase64Parameter.php
+++ b/engine/classes/XMLRPCBase64Parameter.php
@@ -25,4 +25,4 @@ class XMLRPCBase64Parameter extends XMLRPCParameter {
function __toString() {
return "<value><base64>{$value}</base64></value>";
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/XMLRPCBoolParameter.php b/engine/classes/XMLRPCBoolParameter.php
index c53d9ad14..607841cb8 100644
--- a/engine/classes/XMLRPCBoolParameter.php
+++ b/engine/classes/XMLRPCBoolParameter.php
@@ -27,4 +27,4 @@ class XMLRPCBoolParameter extends XMLRPCParameter {
$code = ($this->value) ? "1" : "0";
return "<value><boolean>{$code}</boolean></value>";
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/XMLRPCCall.php b/engine/classes/XMLRPCCall.php
index 3b33f3cee..8eeba0c29 100644
--- a/engine/classes/XMLRPCCall.php
+++ b/engine/classes/XMLRPCCall.php
@@ -59,4 +59,4 @@ class XMLRPCCall {
// parameters
$this->params = $xml->children[1]->children;
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/XMLRPCDateParameter.php b/engine/classes/XMLRPCDateParameter.php
index 35e02fb37..93bbbd8f5 100644
--- a/engine/classes/XMLRPCDateParameter.php
+++ b/engine/classes/XMLRPCDateParameter.php
@@ -30,4 +30,4 @@ class XMLRPCDateParameter extends XMLRPCParameter {
$value = date('c', $this->value);
return "<value><dateTime.iso8601>{$value}</dateTime.iso8601></value>";
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/XMLRPCErrorResponse.php b/engine/classes/XMLRPCErrorResponse.php
index c3dbd0373..425c075cc 100644
--- a/engine/classes/XMLRPCErrorResponse.php
+++ b/engine/classes/XMLRPCErrorResponse.php
@@ -33,4 +33,4 @@ class XMLRPCErrorResponse extends XMLRPCResponse {
public function __toString() {
return "<methodResponse><fault><value>{$this->parameters[0]}</value></fault></methodResponse>";
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/XMLRPCParameter.php b/engine/classes/XMLRPCParameter.php
index 5fac33201..ffbad8082 100644
--- a/engine/classes/XMLRPCParameter.php
+++ b/engine/classes/XMLRPCParameter.php
@@ -13,4 +13,4 @@ abstract class XMLRPCParameter {
*/
function __construct() { }
-} \ No newline at end of file
+}
diff --git a/engine/classes/XMLRPCResponse.php b/engine/classes/XMLRPCResponse.php
index 2a0319431..a6256d385 100644
--- a/engine/classes/XMLRPCResponse.php
+++ b/engine/classes/XMLRPCResponse.php
@@ -68,4 +68,4 @@ abstract class XMLRPCResponse {
public function addBoolean($value) {
$this->addParameter(new XMLRPCBoolParameter($value));
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/XMLRPCStructParameter.php b/engine/classes/XMLRPCStructParameter.php
index 754c92616..694ddf5df 100644
--- a/engine/classes/XMLRPCStructParameter.php
+++ b/engine/classes/XMLRPCStructParameter.php
@@ -52,4 +52,4 @@ class XMLRPCStructParameter extends XMLRPCParameter {
return "<value><struct>$params</struct></value>";
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/XMLRPCSuccessResponse.php b/engine/classes/XMLRPCSuccessResponse.php
index 2f452ef42..e02e82c5c 100644
--- a/engine/classes/XMLRPCSuccessResponse.php
+++ b/engine/classes/XMLRPCSuccessResponse.php
@@ -19,4 +19,4 @@ class XMLRPCSuccessResponse extends XMLRPCResponse {
return "<methodResponse><params>$params</params></methodResponse>";
}
-} \ No newline at end of file
+}
diff --git a/engine/classes/XmlElement.php b/engine/classes/XmlElement.php
index 64d54e6b0..280bba664 100644
--- a/engine/classes/XmlElement.php
+++ b/engine/classes/XmlElement.php
@@ -17,4 +17,4 @@ class XmlElement {
/** Child elements */
public $children;
-}; \ No newline at end of file
+};
diff --git a/engine/handlers/action_handler.php b/engine/handlers/action_handler.php
index cf6c8c9eb..bcad110b2 100644
--- a/engine/handlers/action_handler.php
+++ b/engine/handlers/action_handler.php
@@ -17,4 +17,4 @@
require_once(dirname(dirname(__FILE__)) . "/start.php");
$action = get_input("action");
-action($action); \ No newline at end of file
+action($action);
diff --git a/engine/handlers/export_handler.php b/engine/handlers/export_handler.php
index 709102663..264ecce90 100644
--- a/engine/handlers/export_handler.php
+++ b/engine/handlers/export_handler.php
@@ -113,4 +113,4 @@ if (($guid != "") && ($type == "") && ($id_or_name == "")) {
$content = elgg_view_title($title) . $body;
$body = elgg_view_layout('one_sidebar', array('content' => $content));
-echo elgg_view_page($title, $body); \ No newline at end of file
+echo elgg_view_page($title, $body);
diff --git a/engine/handlers/page_handler.php b/engine/handlers/page_handler.php
index 7d293c3e4..69dbea79a 100644
--- a/engine/handlers/page_handler.php
+++ b/engine/handlers/page_handler.php
@@ -23,4 +23,4 @@ $page = get_input('page');
if (!page_handler($handler, $page)) {
forward('', '404');
-} \ No newline at end of file
+}
diff --git a/engine/handlers/service_handler.php b/engine/handlers/service_handler.php
index a23528be8..9cfcd230f 100644
--- a/engine/handlers/service_handler.php
+++ b/engine/handlers/service_handler.php
@@ -24,4 +24,4 @@ require_once(dirname(dirname(__FILE__)) . "/start.php");
$handler = get_input('handler');
$request = get_input('request');
-service_handler($handler, $request); \ No newline at end of file
+service_handler($handler, $request);
diff --git a/engine/handlers/xml-rpc_handler.php b/engine/handlers/xml-rpc_handler.php
index c5dedea1d..2ee29e5b7 100644
--- a/engine/handlers/xml-rpc_handler.php
+++ b/engine/handlers/xml-rpc_handler.php
@@ -41,4 +41,4 @@ if (!($result instanceof XMLRPCResponse)) {
}
// Output result
-echo elgg_view_page("XML-RPC", elgg_view("xml-rpc/output", array('result' => $result))); \ No newline at end of file
+echo elgg_view_page("XML-RPC", elgg_view("xml-rpc/output", array('result' => $result)));
diff --git a/engine/lib/access.php b/engine/lib/access.php
index ae95982e6..68a01dfad 100644
--- a/engine/lib/access.php
+++ b/engine/lib/access.php
@@ -35,7 +35,7 @@ function get_access_list($user_id = 0, $site_id = 0, $flush = false) {
}
if ($user_id == 0) {
- $user_id = get_loggedin_userid();
+ $user_id = elgg_get_logged_in_user_guid();
}
if (($site_id == 0) && (isset($CONFIG->site_id))) {
@@ -77,7 +77,7 @@ function get_access_array($user_id = 0, $site_id = 0, $flush = false) {
}
if ($user_id == 0) {
- $user_id = get_loggedin_userid();
+ $user_id = elgg_get_logged_in_user_guid();
}
if (($site_id == 0) && (isset($CONFIG->site_guid))) {
@@ -91,7 +91,7 @@ function get_access_array($user_id = 0, $site_id = 0, $flush = false) {
$tmp_access_array = array(ACCESS_PUBLIC);
// The following can only return sensible data if the user is logged in.
- if (isloggedin()) {
+ if (elgg_is_logged_in()) {
$tmp_access_array[] = ACCESS_LOGGED_IN;
// Get ACL memberships
@@ -157,7 +157,7 @@ function get_default_access(ElggUser $user = null) {
return $CONFIG->default_access;
}
- if (!($user) && (!$user = get_loggedin_user())) {
+ if (!($user) && (!$user = elgg_get_logged_in_user_entity())) {
return $CONFIG->default_access;
}
@@ -264,7 +264,7 @@ function get_access_sql_suffix($table_prefix = '', $owner = null) {
}
if (!isset($owner)) {
- $owner = get_loggedin_userid();
+ $owner = elgg_get_logged_in_user_guid();
}
if (!$owner) {
@@ -370,7 +370,7 @@ function get_write_access_array($user_id = 0, $site_id = 0, $flush = false) {
static $access_array;
if ($user_id == 0) {
- $user_id = get_loggedin_userid();
+ $user_id = elgg_get_logged_in_user_guid();
}
if (($site_id == 0) && (isset($CONFIG->site_id))) {
@@ -437,7 +437,7 @@ function create_access_collection($name, $owner_guid = 0, $site_guid = 0) {
}
if ($owner_guid == 0) {
- $owner_guid = get_loggedin_userid();
+ $owner_guid = elgg_get_logged_in_user_guid();
}
if (($site_guid == 0) && (isset($CONFIG->site_guid))) {
$site_guid = $CONFIG->site_guid;
@@ -930,7 +930,7 @@ function access_init() {
* @elgg_event_handler permissions_check all
*/
function elgg_override_permissions_hook() {
- $user_guid = get_loggedin_userid();
+ $user_guid = elgg_get_logged_in_user_guid();
// check for admin
if ($user_guid && elgg_is_admin_user($user_guid)) {
@@ -951,4 +951,4 @@ elgg_register_event_handler('init', 'system', 'access_init', 9999);
// For overrided permissions
elgg_register_plugin_hook_handler('permissions_check', 'all', 'elgg_override_permissions_hook');
-elgg_register_plugin_hook_handler('container_permissions_check', 'all', 'elgg_override_permissions_hook'); \ No newline at end of file
+elgg_register_plugin_hook_handler('container_permissions_check', 'all', 'elgg_override_permissions_hook');
diff --git a/engine/lib/actions.php b/engine/lib/actions.php
index a93617df9..4538eda0b 100644
--- a/engine/lib/actions.php
+++ b/engine/lib/actions.php
@@ -86,8 +86,8 @@ function action($action, $forwarder = "") {
}
if (isset($CONFIG->actions[$action])) {
- if (isadminloggedin() || ($CONFIG->actions[$action]['access'] !== 'admin')) {
- if (isloggedin() || ($CONFIG->actions[$action]['access'] === 'public')) {
+ if (elgg_is_admin_logged_in() || ($CONFIG->actions[$action]['access'] !== 'admin')) {
+ if (elgg_is_logged_in() || ($CONFIG->actions[$action]['access'] === 'public')) {
// Trigger action event
// @todo This is only called before the primary action is called.
@@ -433,4 +433,4 @@ function ajax_action_hook() {
}
}
-elgg_register_event_handler('init', 'system', 'actions_init'); \ No newline at end of file
+elgg_register_event_handler('init', 'system', 'actions_init');
diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php
index 035c5e705..f43c13c87 100644
--- a/engine/lib/annotations.php
+++ b/engine/lib/annotations.php
@@ -69,7 +69,7 @@ $owner_guid, $access_id = ACCESS_PRIVATE) {
$owner_guid = (int)$owner_guid;
if ($owner_guid == 0) {
- $owner_guid = get_loggedin_userid();
+ $owner_guid = elgg_get_logged_in_user_guid();
}
$access_id = (int)$access_id;
@@ -133,7 +133,7 @@ function update_annotation($annotation_id, $name, $value, $value_type, $owner_gu
$owner_guid = (int)$owner_guid;
if ($owner_guid == 0) {
- $owner_guid = get_loggedin_userid();
+ $owner_guid = elgg_get_logged_in_user_guid();
}
$access_id = (int)$access_id;
@@ -941,7 +941,7 @@ function get_annotation_url($id) {
function elgg_annotation_exists($entity_guid, $annotation_type, $owner_guid = NULL) {
global $CONFIG;
- if (!$owner_guid && !($owner_guid = get_loggedin_userid())) {
+ if (!$owner_guid && !($owner_guid = elgg_get_logged_in_user_guid())) {
return FALSE;
}
diff --git a/engine/lib/calendar.php b/engine/lib/calendar.php
index 6ee9980e5..a882aedbe 100644
--- a/engine/lib/calendar.php
+++ b/engine/lib/calendar.php
@@ -558,4 +558,4 @@ $fullview = true, $listtypetoggle = false, $navigation = true) {
return list_notable_entities($day_start, $day_end, $type, $subtype, $owner_guid, $limit,
$fullview, $listtypetoggle, $navigation);
-} \ No newline at end of file
+}
diff --git a/engine/lib/configuration.php b/engine/lib/configuration.php
index 192959896..05a5adcc4 100644
--- a/engine/lib/configuration.php
+++ b/engine/lib/configuration.php
@@ -589,4 +589,4 @@ function configuration_boot() {
get_all_config();
}
-elgg_register_event_handler('boot', 'system', 'configuration_boot', 10); \ No newline at end of file
+elgg_register_event_handler('boot', 'system', 'configuration_boot', 10);
diff --git a/engine/lib/cron.php b/engine/lib/cron.php
index ff57a41f1..f216e0b2d 100644
--- a/engine/lib/cron.php
+++ b/engine/lib/cron.php
@@ -88,4 +88,4 @@ function cron_public_pages($hook, $type, $return_value, $params) {
return $return_value;
}
-elgg_register_event_handler('init', 'system', 'cron_init'); \ No newline at end of file
+elgg_register_event_handler('init', 'system', 'cron_init');
diff --git a/engine/lib/database.php b/engine/lib/database.php
index 5f5380002..b2cc5ca29 100644
--- a/engine/lib/database.php
+++ b/engine/lib/database.php
@@ -759,4 +759,4 @@ function sanitize_int($int) {
/**
* @elgg_register_event boot system init_db
*/
-elgg_register_event_handler('boot', 'system', 'init_db', 0); \ No newline at end of file
+elgg_register_event_handler('boot', 'system', 'init_db', 0);
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 3ab53c678..bc097e4ab 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -424,7 +424,7 @@ function update_entity($guid, $owner_guid, $access_id, $container_guid = null) {
* A plugin hook container_permissions_check:$entity_type is emitted to allow granular
* access controls in plugins.
*
- * @param int $user_guid The user guid, or 0 for get_loggedin_userid()
+ * @param int $user_guid The user guid, or 0 for elgg_get_logged_in_user_guid()
* @param int $container_guid The container, or 0 for the current page owner.
* @param string $type The type of entity we're looking to write
* @param string $subtype The subtype of the entity we're looking to write
@@ -436,7 +436,7 @@ function can_write_to_container($user_guid = 0, $container_guid = 0, $type = 'al
$user_guid = (int)$user_guid;
$user = get_entity($user_guid);
if (!$user) {
- $user = get_loggedin_user();
+ $user = elgg_get_logged_in_user_entity();
}
$container_guid = (int)$container_guid;
@@ -513,7 +513,7 @@ $container_guid = 0) {
$container_guid = $owner_guid;
}
- $user = get_loggedin_user();
+ $user = elgg_get_logged_in_user_entity();
if (!can_write_to_container($user->guid, $owner_guid, $type, $subtype)) {
return false;
}
@@ -1317,7 +1317,7 @@ function disable_entity($guid, $reason = "", $recursive = true) {
// @todo Do this better.
static $__RECURSIVE_DELETE_TOKEN;
// Make it slightly harder to guess
- $__RECURSIVE_DELETE_TOKEN = md5(get_loggedin_userid());
+ $__RECURSIVE_DELETE_TOKEN = md5(elgg_get_logged_in_user_guid());
$sub_entities = get_data("SELECT * from {$CONFIG->dbprefix}entities
WHERE container_guid=$guid
@@ -1423,7 +1423,7 @@ function delete_entity($guid, $recursive = true) {
// @todo Do this better.
static $__RECURSIVE_DELETE_TOKEN;
// Make it slightly harder to guess
- $__RECURSIVE_DELETE_TOKEN = md5(get_loggedin_userid());
+ $__RECURSIVE_DELETE_TOKEN = md5(elgg_get_logged_in_user_guid());
$sub_entities = get_data("SELECT * from {$CONFIG->dbprefix}entities
WHERE container_guid=$guid
@@ -1693,7 +1693,7 @@ function can_edit_entity($entity_guid, $user_guid = 0) {
$user_guid = (int)$user_guid;
$user = get_entity($user_guid);
if (!$user) {
- $user = get_loggedin_user();
+ $user = elgg_get_logged_in_user_entity();
}
$return = false;
@@ -2060,8 +2060,8 @@ function elgg_list_registered_entities($options) {
function recursive_delete_permissions_check() {
static $__RECURSIVE_DELETE_TOKEN;
- if ((isloggedin()) && ($__RECURSIVE_DELETE_TOKEN)
- && (strcmp($__RECURSIVE_DELETE_TOKEN, md5(get_loggedin_userid())))) {
+ if ((elgg_is_logged_in()) && ($__RECURSIVE_DELETE_TOKEN)
+ && (strcmp($__RECURSIVE_DELETE_TOKEN, md5(elgg_get_logged_in_user_guid())))) {
return true;
}
diff --git a/engine/lib/extender.php b/engine/lib/extender.php
index 8df207767..f0fc98d12 100644
--- a/engine/lib/extender.php
+++ b/engine/lib/extender.php
@@ -122,14 +122,14 @@ function import_extender_plugin_hook($hook, $entity_type, $returnvalue, $params)
* @return true|false
*/
function can_edit_extender($extender_id, $type, $user_guid = 0) {
- if (!isloggedin()) {
+ if (!elgg_is_logged_in()) {
return false;
}
$user_guid = (int)$user_guid;
$user = get_entity($user_guid);
if (!$user) {
- $user = get_loggedin_user();
+ $user = elgg_get_logged_in_user_entity();
}
$functionname = "get_{$type}";
@@ -236,4 +236,4 @@ function get_extender_url(ElggExtender $extender) {
}
/** Register the hook */
-elgg_register_plugin_hook_handler("import", "all", "import_extender_plugin_hook", 2); \ No newline at end of file
+elgg_register_plugin_hook_handler("import", "all", "import_extender_plugin_hook", 2);
diff --git a/engine/lib/filestore.php b/engine/lib/filestore.php
index 6f912599a..1e257c8b0 100644
--- a/engine/lib/filestore.php
+++ b/engine/lib/filestore.php
@@ -508,4 +508,4 @@ function filestore_test($hook, $type, $value, $params) {
elgg_register_event_handler('init', 'system', 'filestore_init', 100);
// Unit testing
-elgg_register_plugin_hook_handler('unit_test', 'system', 'filestore_test'); \ No newline at end of file
+elgg_register_plugin_hook_handler('unit_test', 'system', 'filestore_test');
diff --git a/engine/lib/group.php b/engine/lib/group.php
index 7b3f76e27..f3314ada6 100644
--- a/engine/lib/group.php
+++ b/engine/lib/group.php
@@ -261,14 +261,14 @@ function group_gatekeeper($forward = true) {
if ($group instanceof ElggGroup) {
$url = $group->getURL();
if (
- ((!isloggedin()) && (!$group->isPublicMembership())) ||
- ((!$group->isMember(get_loggedin_user()) && (!$group->isPublicMembership())))
+ ((!elgg_is_logged_in()) && (!$group->isPublicMembership())) ||
+ ((!$group->isMember(elgg_get_logged_in_user_entity()) && (!$group->isPublicMembership())))
) {
$allowed = false;
}
// Admin override
- if (isadminloggedin()) {
+ if (elgg_is_admin_logged_in()) {
$allowed = true;
}
}
diff --git a/engine/lib/input.php b/engine/lib/input.php
index b5bf4eea5..624c6111e 100644
--- a/engine/lib/input.php
+++ b/engine/lib/input.php
@@ -204,7 +204,7 @@ function elgg_clear_sticky_value($form_name, $variable) {
function input_livesearch_page_handler($page) {
global $CONFIG;
// only return results to logged in users.
- if (!$user = get_loggedin_user()) {
+ if (!$user = elgg_get_logged_in_user_entity()) {
exit;
}
diff --git a/engine/lib/languages.php b/engine/lib/languages.php
index 16169282d..7607ea3bf 100644
--- a/engine/lib/languages.php
+++ b/engine/lib/languages.php
@@ -64,7 +64,7 @@ function get_current_language() {
function get_language() {
global $CONFIG;
- $user = get_loggedin_user();
+ $user = elgg_get_logged_in_user_entity();
$language = false;
if (($user) && ($user->language)) {
@@ -230,7 +230,7 @@ function get_installed_translations() {
foreach ($CONFIG->translations as $k => $v) {
$installed[$k] = elgg_echo($k, array(), $k);
- if (isadminloggedin()) {
+ if (elgg_is_admin_logged_in()) {
$completeness = get_language_completeness($k);
if (($completeness < 100) && ($k != 'en')) {
$installed[$k] .= " (" . $completeness . "% " . elgg_echo('complete') . ")";
@@ -301,4 +301,4 @@ function get_missing_language_keys($language) {
return false;
}
-register_translations(dirname(dirname(dirname(__FILE__))) . "/languages/"); \ No newline at end of file
+register_translations(dirname(dirname(dirname(__FILE__))) . "/languages/");
diff --git a/engine/lib/mb_wrapper.php b/engine/lib/mb_wrapper.php
index da7a96c1f..c2f5503e0 100644
--- a/engine/lib/mb_wrapper.php
+++ b/engine/lib/mb_wrapper.php
@@ -230,4 +230,4 @@ function elgg_substr() {
return call_user_func_array('mb_substr', $args);
}
return call_user_func_array('substr', $args);
-} \ No newline at end of file
+}
diff --git a/engine/lib/memcache.php b/engine/lib/memcache.php
index 6e905b0d4..f79fba4a9 100644
--- a/engine/lib/memcache.php
+++ b/engine/lib/memcache.php
@@ -34,4 +34,4 @@ function is_memcache_available() {
}
return $memcache_available;
-} \ No newline at end of file
+}
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php
index 79bb774f8..6204e0461 100644
--- a/engine/lib/metadata.php
+++ b/engine/lib/metadata.php
@@ -118,7 +118,7 @@ function create_metadata($entity_guid, $name, $value, $value_type, $owner_guid,
}
if ($owner_guid == 0) {
- $owner_guid = get_loggedin_userid();
+ $owner_guid = elgg_get_logged_in_user_guid();
}
$access_id = (int)$access_id;
@@ -215,7 +215,7 @@ function update_metadata($id, $name, $value, $value_type, $owner_guid, $access_i
$owner_guid = (int)$owner_guid;
if ($owner_guid == 0) {
- $owner_guid = get_loggedin_userid();
+ $owner_guid = elgg_get_logged_in_user_guid();
}
$access_id = (int)$access_id;
diff --git a/engine/lib/metastrings.php b/engine/lib/metastrings.php
index 229adb0ed..28f8475da 100644
--- a/engine/lib/metastrings.php
+++ b/engine/lib/metastrings.php
@@ -199,4 +199,4 @@ function delete_orphaned_metastrings() {
)";
return delete_data($query);
-} \ No newline at end of file
+}
diff --git a/engine/lib/notification.php b/engine/lib/notification.php
index 44539d8b5..841920d8b 100644
--- a/engine/lib/notification.php
+++ b/engine/lib/notification.php
@@ -170,7 +170,7 @@ function get_user_notification_settings($user_guid = 0) {
$user_guid = (int)$user_guid;
if ($user_guid == 0) {
- $user_guid = get_loggedin_userid();
+ $user_guid = elgg_get_logged_in_user_guid();
}
$all_metadata = get_metadata_for_entity($user_guid);
@@ -208,7 +208,7 @@ function set_user_notification_setting($user_guid, $method, $value) {
$user = get_entity($user_guid);
if (!$user) {
- $user = get_loggedin_user();
+ $user = elgg_get_logged_in_user_entity();
}
if (($user) && ($user instanceof ElggUser)) {
@@ -513,4 +513,4 @@ function object_notifications($event, $object_type, $object) {
// Register a startup event
elgg_register_event_handler('init', 'system', 'notification_init', 0);
-elgg_register_event_handler('create', 'object', 'object_notifications'); \ No newline at end of file
+elgg_register_event_handler('create', 'object', 'object_notifications');
diff --git a/engine/lib/objects.php b/engine/lib/objects.php
index 074a638d9..8819a1094 100644
--- a/engine/lib/objects.php
+++ b/engine/lib/objects.php
@@ -134,4 +134,4 @@ function objects_test($hook, $type, $value, $params) {
}
elgg_register_event_handler('init', 'system', 'objects_init', 0);
-elgg_register_plugin_hook_handler('unit_test', 'system', 'objects_test'); \ No newline at end of file
+elgg_register_plugin_hook_handler('unit_test', 'system', 'objects_test');
diff --git a/engine/lib/opendd.php b/engine/lib/opendd.php
index d856806f5..69977d1d9 100644
--- a/engine/lib/opendd.php
+++ b/engine/lib/opendd.php
@@ -99,4 +99,4 @@ function ODD_Import($xml) {
*/
function ODD_Export(ODDDocument $document) {
return "$document";
-} \ No newline at end of file
+}
diff --git a/engine/lib/pageowner.php b/engine/lib/pageowner.php
index f8b23b6a9..3f0c58a5d 100644
--- a/engine/lib/pageowner.php
+++ b/engine/lib/pageowner.php
@@ -213,4 +213,4 @@ function page_owner_boot() {
$CONFIG->context = array('main');
}
-elgg_register_event_handler('boot', 'system', 'page_owner_boot'); \ No newline at end of file
+elgg_register_event_handler('boot', 'system', 'page_owner_boot');
diff --git a/engine/lib/pam.php b/engine/lib/pam.php
index 37e709a8a..308d4d291 100644
--- a/engine/lib/pam.php
+++ b/engine/lib/pam.php
@@ -110,4 +110,4 @@ function pam_authenticate($credentials = NULL, $policy = "user") {
}
return $authenticated;
-} \ No newline at end of file
+}
diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php
index 8d6daef6e..85f821315 100644
--- a/engine/lib/plugins.php
+++ b/engine/lib/plugins.php
@@ -775,7 +775,7 @@ function find_plugin_usersettings($plugin_id = null, $user_guid = 0) {
}
if ($user_guid == 0) {
- $user_guid = get_loggedin_userid();
+ $user_guid = elgg_get_logged_in_user_guid();
}
// Get private settings for user
@@ -825,7 +825,7 @@ function set_plugin_usersetting($name, $value, $user_guid = 0, $plugin_id = "")
$user = get_entity($user_guid);
if (!$user) {
- $user = get_loggedin_user();
+ $user = elgg_get_logged_in_user_entity();
}
if (($user) && ($user instanceof ElggUser)) {
@@ -864,7 +864,7 @@ function clear_plugin_usersetting($name, $user_guid = 0, $plugin_id = '') {
$user = get_entity((int) $user_guid);
if (!$user) {
- $user = get_loggedin_user();
+ $user = elgg_get_logged_in_user_entity();
}
if (($user) && ($user instanceof ElggUser)) {
@@ -897,7 +897,7 @@ function get_plugin_usersetting($name, $user_guid = 0, $plugin_id = "") {
$user = get_entity($user_guid);
if (!$user) {
- $user = get_loggedin_user();
+ $user = elgg_get_logged_in_user_entity();
}
if (($user) && ($user instanceof ElggUser)) {
@@ -1048,4 +1048,4 @@ function plugin_init() {
elgg_register_action('admin/plugins/set_priority', '', 'admin');
}
-elgg_register_event_handler('init', 'system', 'plugin_init'); \ No newline at end of file
+elgg_register_event_handler('init', 'system', 'plugin_init');
diff --git a/engine/lib/river.php b/engine/lib/river.php
index fd6e97b12..2c8925393 100644
--- a/engine/lib/river.php
+++ b/engine/lib/river.php
@@ -513,7 +513,7 @@ function update_river_access_by_object($object_guid, $access_id) {
function elgg_river_page_handler($page) {
global $CONFIG;
- elgg_set_page_owner_guid(get_loggedin_userid());
+ elgg_set_page_owner_guid(elgg_get_logged_in_user_guid());
$page_type = elgg_get_array_value(0, $page, 'all');
if ($page_type == 'owner') {
diff --git a/engine/lib/sessions.php b/engine/lib/sessions.php
index d91ede9f5..3a1648d3f 100644
--- a/engine/lib/sessions.php
+++ b/engine/lib/sessions.php
@@ -469,7 +469,7 @@ function session_init($event, $object_type, $object) {
* @return void
*/
function gatekeeper() {
- if (!isloggedin()) {
+ if (!elgg_is_logged_in()) {
$_SESSION['last_forward_from'] = current_page_url();
register_error(elgg_echo('loggedinrequired'));
forward('', 'login');
@@ -484,7 +484,7 @@ function gatekeeper() {
function admin_gatekeeper() {
gatekeeper();
- if (!isadminloggedin()) {
+ if (!elgg_is_admin_logged_in()) {
$_SESSION['last_forward_from'] = current_page_url();
register_error(elgg_echo('adminrequired'));
forward('', 'admin');
diff --git a/engine/lib/statistics.php b/engine/lib/statistics.php
index 578985fd0..4e822e8af 100644
--- a/engine/lib/statistics.php
+++ b/engine/lib/statistics.php
@@ -115,4 +115,4 @@ function statistics_init() {
}
/// Register init function
-elgg_register_event_handler('init', 'system', 'statistics_init'); \ No newline at end of file
+elgg_register_event_handler('init', 'system', 'statistics_init');
diff --git a/engine/lib/system_log.php b/engine/lib/system_log.php
index 1578ebeba..21e119b7c 100644
--- a/engine/lib/system_log.php
+++ b/engine/lib/system_log.php
@@ -163,7 +163,7 @@ function system_log($object, $event) {
$object_subtype = $object->getSubtype();
$event = sanitise_string($event);
$time = time();
- $performed_by = get_loggedin_userid();
+ $performed_by = elgg_get_logged_in_user_guid();
if (isset($object->access_id)) {
$access_id = $object->access_id;
@@ -274,4 +274,4 @@ function system_log_listener($event, $object_type, $object) {
elgg_register_event_handler('all', 'all', 'system_log_listener', 400);
/** Register a default system log handler */
-elgg_register_event_handler('log', 'systemlog', 'system_log_default_logger', 999); \ No newline at end of file
+elgg_register_event_handler('log', 'systemlog', 'system_log_default_logger', 999);
diff --git a/engine/lib/upgrades/2008100701.php b/engine/lib/upgrades/2008100701.php
index 394a90046..38837f81d 100644
--- a/engine/lib/upgrades/2008100701.php
+++ b/engine/lib/upgrades/2008100701.php
@@ -4,4 +4,4 @@
* Because Elgg now has a plugable account activation process we need to activate
* the email account activation plugin for existing installs.
*/
- enable_plugin('uservalidationbyemail', $CONFIG->site->guid); \ No newline at end of file
+ enable_plugin('uservalidationbyemail', $CONFIG->site->guid);
diff --git a/engine/lib/upgrades/2009022701.php b/engine/lib/upgrades/2009022701.php
index 2e83b56b3..293e9fb99 100644
--- a/engine/lib/upgrades/2009022701.php
+++ b/engine/lib/upgrades/2009022701.php
@@ -4,4 +4,4 @@
/**
* Disable update client since this has now been removed.
*/
- disable_plugin('updateclient', $CONFIG->site->guid); \ No newline at end of file
+ disable_plugin('updateclient', $CONFIG->site->guid);
diff --git a/engine/lib/upgrades/2009041701.php b/engine/lib/upgrades/2009041701.php
index acc8fc0bd..2d3d612c3 100644
--- a/engine/lib/upgrades/2009041701.php
+++ b/engine/lib/upgrades/2009041701.php
@@ -6,4 +6,4 @@
/**
* Elgg now has kses tag filtering built as a plugin. This needs to be enabled.
*/
- enable_plugin('kses', $CONFIG->site->guid); \ No newline at end of file
+ enable_plugin('kses', $CONFIG->site->guid);
diff --git a/engine/lib/upgrades/2009070101.php b/engine/lib/upgrades/2009070101.php
index 3bf89e9b7..a72d6ea95 100644
--- a/engine/lib/upgrades/2009070101.php
+++ b/engine/lib/upgrades/2009070101.php
@@ -7,4 +7,4 @@
* Kses appears to be a dead project so we are deprecating it in favour of htmlawed.
*/
disable_plugin('kses', $CONFIG->site->guid);
- enable_plugin('htmlawed', $CONFIG->site->guid); \ No newline at end of file
+ enable_plugin('htmlawed', $CONFIG->site->guid);
diff --git a/engine/lib/upgrades/2010033101.php b/engine/lib/upgrades/2010033101.php
index 5c8ee036b..3265f4e61 100644
--- a/engine/lib/upgrades/2010033101.php
+++ b/engine/lib/upgrades/2010033101.php
@@ -66,4 +66,4 @@ if ($dbversion < 2009100701) {
}
}
}
-} \ No newline at end of file
+}
diff --git a/engine/lib/upgrades/2010040201.php b/engine/lib/upgrades/2010040201.php
index 22eee15f8..92c7d6a5c 100644
--- a/engine/lib/upgrades/2010040201.php
+++ b/engine/lib/upgrades/2010040201.php
@@ -37,4 +37,4 @@ $qs[] = "DELETE FROM {$CONFIG->dbprefix}metadata
foreach ($qs as $q) {
update_data($q);
-} \ No newline at end of file
+}
diff --git a/engine/lib/upgrades/2010061501.php b/engine/lib/upgrades/2010061501.php
index d230236fc..550489e4d 100644
--- a/engine/lib/upgrades/2010061501.php
+++ b/engine/lib/upgrades/2010061501.php
@@ -71,4 +71,4 @@ if ($dbversion < 2009100701) {
}
}
}
-} \ No newline at end of file
+}
diff --git a/engine/lib/upgrades/2010121401.php b/engine/lib/upgrades/2010121401.php
index 30e4dff32..9619dd655 100644
--- a/engine/lib/upgrades/2010121401.php
+++ b/engine/lib/upgrades/2010121401.php
@@ -4,4 +4,4 @@ global $CONFIG;
/**
* Disable members plugin as it has been moved into core.
*/
-disable_plugin('members', $CONFIG->site->guid); \ No newline at end of file
+disable_plugin('members', $CONFIG->site->guid);
diff --git a/engine/lib/upgrades/2011010101.php b/engine/lib/upgrades/2011010101.php
index eac5810c4..bb1290854 100644
--- a/engine/lib/upgrades/2011010101.php
+++ b/engine/lib/upgrades/2011010101.php
@@ -72,4 +72,4 @@ elgg_filepath_cache_reset();
remove_metadata($site->guid, 'pluginorder');
remove_metadata($site->guid, 'enabled_plugins');
-elgg_set_ignore_access($old_id); \ No newline at end of file
+elgg_set_ignore_access($old_id);
diff --git a/engine/lib/users.php b/engine/lib/users.php
index be7399a44..4d388d574 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -1100,7 +1100,7 @@ function elgg_get_user_validation_status($user_guid) {
*/
function collections_submenu_items() {
- $user = get_loggedin_user();
+ $user = elgg_get_logged_in_user_entity();
elgg_register_menu_item('page', array(
'name' => 'friends:collections',
@@ -1126,7 +1126,7 @@ function friends_page_handler($page_elements) {
if (isset($page_elements[0]) && $user = get_user_by_username($page_elements[0])) {
set_page_owner($user->getGUID());
}
- if (get_loggedin_userid() == elgg_get_page_owner_guid()) {
+ if (elgg_get_logged_in_user_guid() == elgg_get_page_owner_guid()) {
// disabled for now as we no longer use friends collections (replaced by shared access)
// collections_submenu_items();
}
@@ -1145,7 +1145,7 @@ function friends_of_page_handler($page_elements) {
if (isset($page_elements[0]) && $user = get_user_by_username($page_elements[0])) {
set_page_owner($user->getGUID());
}
- if (get_loggedin_userid() == elgg_get_page_owner_guid()) {
+ if (elgg_get_logged_in_user_guid() == elgg_get_page_owner_guid()) {
// disabled for now as we no longer use friends collections (replaced by shared access)
// collections_submenu_items();
}
@@ -1162,13 +1162,13 @@ function friends_of_page_handler($page_elements) {
function collections_page_handler($page_elements) {
if (isset($page_elements[0])) {
if ($page_elements[0] == "add") {
- set_page_owner(get_loggedin_userid());
+ set_page_owner(elgg_get_logged_in_user_guid());
collections_submenu_items();
require_once(dirname(dirname(dirname(__FILE__))) . "/pages/friends/add.php");
} else {
if ($user = get_user_by_username($page_elements[0])) {
set_page_owner($user->getGUID());
- if (get_loggedin_userid() == elgg_get_page_owner_guid()) {
+ if (elgg_get_logged_in_user_guid() == elgg_get_page_owner_guid()) {
collections_submenu_items();
}
require_once(dirname(dirname(dirname(__FILE__))) . "/pages/friends/collections.php");
@@ -1293,8 +1293,8 @@ function user_avatar_hook($hook, $entity_type, $returnvalue, $params) {
function elgg_user_hover_menu($hook, $type, $return, $params) {
$user = $params['entity'];
- if (isloggedin()) {
- if (get_loggedin_userid() != $user->guid) {
+ if (elgg_is_logged_in()) {
+ if (elgg_get_logged_in_user_guid() != $user->guid) {
if ($user->isFriend()) {
$url = "action/friends/remove?friend={$user->guid}";
$text = elgg_echo('friend:remove');
@@ -1320,11 +1320,11 @@ function elgg_user_hover_menu($hook, $type, $return, $params) {
}
// prevent admins from banning or deleting themselves
- if (get_loggedin_userid() == $user->guid) {
+ if (elgg_get_logged_in_user_guid() == $user->guid) {
return $return;
}
- if (isadminloggedin()) {
+ if (elgg_is_admin_logged_in()) {
$actions = array();
if (!$user->isBanned()) {
$actions[] = 'ban';
@@ -1517,7 +1517,7 @@ function users_init() {
$item = new ElggMenuItem('members', elgg_echo('members'), 'pg/members');
elgg_register_menu_item('site', $item);
- $user = get_loggedin_user();
+ $user = elgg_get_logged_in_user_entity();
if ($user) {
$params = array(
'name' => 'edit_avatar',
@@ -1610,4 +1610,4 @@ function users_test($hook, $type, $value, $params) {
elgg_register_event_handler('init', 'system', 'users_init', 0);
elgg_register_event_handler('init', 'system', 'elgg_profile_fields_setup', 10000); // Ensure this runs after other plugins
elgg_register_event_handler('pagesetup', 'system', 'users_pagesetup', 0);
-elgg_register_plugin_hook_handler('unit_test', 'system', 'users_test'); \ No newline at end of file
+elgg_register_plugin_hook_handler('unit_test', 'system', 'users_test');
diff --git a/engine/lib/usersettings.php b/engine/lib/usersettings.php
index a7181626d..f74c01975 100644
--- a/engine/lib/usersettings.php
+++ b/engine/lib/usersettings.php
@@ -13,8 +13,8 @@
* @return void
*/
function usersettings_pagesetup() {
- if (elgg_get_context() == "settings" && get_loggedin_userid()) {
- $user = get_loggedin_user();
+ if (elgg_get_context() == "settings" && elgg_get_logged_in_user_guid()) {
+ $user = elgg_get_logged_in_user_entity();
$params = array(
'name' => '1_account',
@@ -68,7 +68,7 @@ function usersettings_page_handler($page) {
$user = get_user_by_username($page[1]);
elgg_set_page_owner_guid($user->guid);
} else {
- elgg_set_page_owner_guid(get_loggedin_userid());
+ elgg_set_page_owner_guid(elgg_get_logged_in_user_guid());
}
require($path);
@@ -86,4 +86,4 @@ function usersettings_init() {
/// Register init function
elgg_register_event_handler('init', 'system', 'usersettings_init');
-elgg_register_event_handler('pagesetup', 'system', 'usersettings_pagesetup'); \ No newline at end of file
+elgg_register_event_handler('pagesetup', 'system', 'usersettings_pagesetup');
diff --git a/engine/lib/views.php b/engine/lib/views.php
index 21409bab4..9ad8fc347 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -323,7 +323,7 @@ function elgg_view_exists($view, $viewtype = '', $recurse = true) {
* recommend that you do not use them:
* - $vars['config'] The $CONFIG global. (Use {@link elgg_get_config()} instead).
* - $vars['url'] The site URL. (use {@link elgg_get_site_url()} instead).
- * - $vars['user'] The logged in user. (use {@link get_loggedin_user()} instead).
+ * - $vars['user'] The logged in user. (use {@link elgg_get_logged_in_user_entity()} instead).
*
* Custom template handlers can be set with {@link set_template_handler()}.
*
@@ -382,10 +382,10 @@ function elgg_view($view, $vars = array(), $bypass = false, $debug = false, $vie
}
// @warning - plugin authors: do not expect user, config, and url to be
- // set by elgg_view() in the future. Instead, use get_loggedin_user(),
+ // set by elgg_view() in the future. Instead, use elgg_get_logged_in_user_entity(),
// elgg_get_config(), and elgg_get_site_url() in your views.
if (!isset($vars['user'])) {
- $vars['user'] = get_loggedin_user();
+ $vars['user'] = elgg_get_logged_in_user_entity();
}
if (!isset($vars['config'])) {
$vars['config'] = $CONFIG;
@@ -1658,4 +1658,4 @@ function elgg_views_boot() {
}
}
-elgg_register_event_handler('boot', 'system', 'elgg_views_boot', 1000); \ No newline at end of file
+elgg_register_event_handler('boot', 'system', 'elgg_views_boot', 1000);
diff --git a/engine/lib/web_services.php b/engine/lib/web_services.php
index e70359fa8..8e312209b 100644
--- a/engine/lib/web_services.php
+++ b/engine/lib/web_services.php
@@ -825,7 +825,7 @@ function pam_auth_usertoken() {
* @return bool
*/
function pam_auth_session() {
- return isloggedin();
+ return elgg_is_logged_in();
}
// user token functions
diff --git a/engine/lib/widgets.php b/engine/lib/widgets.php
index c96c1967a..1b0bc207b 100644
--- a/engine/lib/widgets.php
+++ b/engine/lib/widgets.php
@@ -11,7 +11,7 @@
* Get widgets for a particular context
*
* The widgets are ordered for display and grouped in columns.
- * $widgets = elgg_get_widgets(get_loggedin_userid(), 'dashboard');
+ * $widgets = elgg_get_widgets(elgg_get_logged_in_user_guid(), 'dashboard');
* $first_column_widgets = $widgets[1];
*
* @param int $user_guid The owner user GUID
@@ -103,11 +103,11 @@ function elgg_can_edit_widget_layout($context, $user_guid = 0) {
$user = get_entity((int)$user_guid);
if (!$user) {
- $user = get_loggedin_user();
+ $user = elgg_get_logged_in_user_entity();
}
$return = false;
- if (isadminloggedin()) {
+ if (elgg_is_admin_logged_in()) {
$return = true;
}
if (elgg_get_page_owner_guid() == $user->guid) {
diff --git a/engine/settings.example.php b/engine/settings.example.php
index 07ca9b642..011770f89 100644
--- a/engine/settings.example.php
+++ b/engine/settings.example.php
@@ -120,4 +120,4 @@ $CONFIG->db_disable_query_cache = FALSE;
*
* @global int $CONFIG->min_password_length
*/
-$CONFIG->min_password_length = 6; \ No newline at end of file
+$CONFIG->min_password_length = 6;
diff --git a/engine/tests/objects/entities.php b/engine/tests/objects/entities.php
index 8e7e30c5b..590e404d8 100644
--- a/engine/tests/objects/entities.php
+++ b/engine/tests/objects/entities.php
@@ -29,8 +29,8 @@ class ElggCoreEntityTest extends ElggCoreUnitTest {
$test_attributes['guid'] = NULL;
$test_attributes['type'] = NULL;
$test_attributes['subtype'] = NULL;
- $test_attributes['owner_guid'] = get_loggedin_userid();
- $test_attributes['container_guid'] = get_loggedin_userid();
+ $test_attributes['owner_guid'] = elgg_get_logged_in_user_guid();
+ $test_attributes['container_guid'] = elgg_get_logged_in_user_guid();
$test_attributes['site_guid'] = NULL;
$test_attributes['access_id'] = ACCESS_PRIVATE;
$test_attributes['time_created'] = NULL;
diff --git a/engine/tests/objects/objects.php b/engine/tests/objects/objects.php
index 55734be13..0d0df6b75 100644
--- a/engine/tests/objects/objects.php
+++ b/engine/tests/objects/objects.php
@@ -41,8 +41,8 @@ class ElggCoreObjectTest extends ElggCoreUnitTest {
$attributes['guid'] = NULL;
$attributes['type'] = 'object';
$attributes['subtype'] = NULL;
- $attributes['owner_guid'] = get_loggedin_userid();
- $attributes['container_guid'] = get_loggedin_userid();
+ $attributes['owner_guid'] = elgg_get_logged_in_user_guid();
+ $attributes['container_guid'] = elgg_get_logged_in_user_guid();
$attributes['site_guid'] = NULL;
$attributes['access_id'] = ACCESS_PRIVATE;
$attributes['time_created'] = NULL;
@@ -87,11 +87,11 @@ class ElggCoreObjectTest extends ElggCoreUnitTest {
public function testElggObjectLoad() {
// fail on wrong type
try {
- $error = new ElggObjectTest(get_loggedin_userid());
+ $error = new ElggObjectTest(elgg_get_logged_in_user_guid());
$this->assertTrue(FALSE);
} catch (Exception $e) {
$this->assertIsA($e, 'InvalidClassException');
- $message = sprintf(elgg_echo('InvalidClassException:NotValidElggStar'), get_loggedin_userid(), 'ElggObject');
+ $message = sprintf(elgg_echo('InvalidClassException:NotValidElggStar'), elgg_get_logged_in_user_guid(), 'ElggObject');
$this->assertIdentical($e->getMessage(), $message);
}
}
@@ -144,7 +144,7 @@ class ElggCoreObjectTest extends ElggCoreUnitTest {
}
public function testElggObjectContainer() {
- $this->assertEqual($this->entity->getContainerGUID(), get_loggedin_userid());
+ $this->assertEqual($this->entity->getContainerGUID(), elgg_get_logged_in_user_guid());
// create and save to group
$group = new ElggGroup();
diff --git a/engine/tests/objects/sites.php b/engine/tests/objects/sites.php
index 4d079c30f..d0d61dcab 100644
--- a/engine/tests/objects/sites.php
+++ b/engine/tests/objects/sites.php
@@ -44,8 +44,8 @@ class ElggCoreSiteTest extends ElggCoreUnitTest {
$attributes['guid'] = NULL;
$attributes['type'] = 'site';
$attributes['subtype'] = NULL;
- $attributes['owner_guid'] = get_loggedin_userid();
- $attributes['container_guid'] = get_loggedin_userid();
+ $attributes['owner_guid'] = elgg_get_logged_in_user_guid();
+ $attributes['container_guid'] = elgg_get_logged_in_user_guid();
$attributes['site_guid'] = NULL;
$attributes['access_id'] = ACCESS_PRIVATE;
$attributes['time_created'] = NULL;
diff --git a/engine/tests/objects/users.php b/engine/tests/objects/users.php
index c0566c9b4..ba93c2439 100644
--- a/engine/tests/objects/users.php
+++ b/engine/tests/objects/users.php
@@ -49,8 +49,8 @@ class ElggCoreUserTest extends ElggCoreUnitTest {
$attributes['guid'] = NULL;
$attributes['type'] = 'user';
$attributes['subtype'] = NULL;
- $attributes['owner_guid'] = get_loggedin_userid();
- $attributes['container_guid'] = get_loggedin_userid();
+ $attributes['owner_guid'] = elgg_get_logged_in_user_guid();
+ $attributes['container_guid'] = elgg_get_logged_in_user_guid();
$attributes['site_guid'] = NULL;
$attributes['access_id'] = ACCESS_PRIVATE;
$attributes['time_created'] = NULL;
@@ -98,7 +98,7 @@ class ElggCoreUserTest extends ElggCoreUnitTest {
}
public function testElggUserConstructorByGuid() {
- $user = new ElggUser(get_loggedin_userid());
+ $user = new ElggUser(elgg_get_logged_in_user_guid());
$this->assertIdentical($user, $_SESSION['user']);
// fail with garbage
@@ -113,13 +113,13 @@ class ElggCoreUserTest extends ElggCoreUnitTest {
}
public function testElggUserConstructorByDbRow() {
- $row = $this->fetchUser(get_loggedin_userid());
+ $row = $this->fetchUser(elgg_get_logged_in_user_guid());
$user = new ElggUser($row);
$this->assertIdentical($user, $_SESSION['user']);
}
public function testElggUserConstructorByUsername() {
- $row = $this->fetchUser(get_loggedin_userid());
+ $row = $this->fetchUser(elgg_get_logged_in_user_guid());
$user = new ElggUser($row->username);
$this->assertIdentical($user, $_SESSION['user']);
}
diff --git a/engine/tests/ui/submenu.php b/engine/tests/ui/submenu.php
index 3121d9e5a..b401620f6 100644
--- a/engine/tests/ui/submenu.php
+++ b/engine/tests/ui/submenu.php
@@ -100,4 +100,4 @@ elgg_add_submenu_item(array('text' => 'All test', 'href' => "$url?all"), 'all');
$body = elgg_view_layout('one_sidebar', array('content' => 'Look right.'));
echo elgg_view_page('Submenu Test', $body);
-*/ \ No newline at end of file
+*/