aboutsummaryrefslogtreecommitdiff
path: root/actions/user
diff options
context:
space:
mode:
Diffstat (limited to 'actions/user')
-rw-r--r--actions/user/default_access.php3
-rw-r--r--actions/user/language.php5
-rw-r--r--actions/user/name.php5
-rw-r--r--actions/user/password.php5
-rw-r--r--actions/user/spotlight.php3
5 files changed, 6 insertions, 15 deletions
diff --git a/actions/user/default_access.php b/actions/user/default_access.php
index ee8fb9efa..0aacf209c 100644
--- a/actions/user/default_access.php
+++ b/actions/user/default_access.php
@@ -15,10 +15,9 @@ if ($CONFIG->allow_user_default_access) {
$default_access = get_input('default_access');
$user_id = get_input('guid');
- $user = "";
if (!$user_id) {
- $user = $_SESSION['user'];
+ $user = get_loggedin_user();
} else {
$user = get_entity($user_id);
}
diff --git a/actions/user/language.php b/actions/user/language.php
index 1165b196e..83cc10dbd 100644
--- a/actions/user/language.php
+++ b/actions/user/language.php
@@ -8,16 +8,13 @@
* @link http://elgg.org/
*/
-global $CONFIG;
-
gatekeeper();
$language = get_input('language');
$user_id = get_input('guid');
-$user = "";
if (!$user_id) {
- $user = $_SESSION['user'];
+ $user = get_loggedin_user();
} else {
$user = get_entity($user_id);
}
diff --git a/actions/user/name.php b/actions/user/name.php
index 3145c5ee7..69a1b9681 100644
--- a/actions/user/name.php
+++ b/actions/user/name.php
@@ -8,16 +8,13 @@
* @link http://elgg.org/
*/
-global $CONFIG;
-
gatekeeper();
$name = strip_tags(get_input('name'));
$user_id = get_input('guid');
-$user = "";
if (!$user_id) {
- $user = $_SESSION['user'];
+ $user = get_loggedin_user();
} else {
$user = get_entity($user_id);
}
diff --git a/actions/user/password.php b/actions/user/password.php
index 6e3ff9447..25723c0b0 100644
--- a/actions/user/password.php
+++ b/actions/user/password.php
@@ -8,17 +8,14 @@
* @link http://elgg.org/
*/
-global $CONFIG;
-
gatekeeper();
$password = get_input('password');
$password2 = get_input('password2');
$user_id = get_input('guid');
-$user = "";
if (!$user_id) {
- $user = $_SESSION['user'];
+ $user = get_loggedin_user();
} else {
$user = get_entity($user_id);
}
diff --git a/actions/user/spotlight.php b/actions/user/spotlight.php
index ff111461e..d0ebb2226 100644
--- a/actions/user/spotlight.php
+++ b/actions/user/spotlight.php
@@ -17,5 +17,6 @@ if ($closed != 'true') {
$closed = true;
}
-$_SESSION['user']->spotlightclosed = $closed;
+get_loggedin_user()->spotlightclosed = $closed;
+// exit as this action is called through Ajax
exit; \ No newline at end of file