aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-30 04:32:04 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-30 04:32:04 +0000
commita2b3db924719b111c7c01812fe3470fbbd1ae7cc (patch)
tree3d4d96a3b91361b177553f9af506ec7f17c14b6b /actions
parent010bc9650139814f2c74a24b6e320c5c4373e5c4 (diff)
downloadelgg-a2b3db924719b111c7c01812fe3470fbbd1ae7cc.tar.gz
elgg-a2b3db924719b111c7c01812fe3470fbbd1ae7cc.tar.bz2
Refs #2428 removed more CONFIG uses
git-svn-id: http://code.elgg.org/elgg/trunk@7769 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions')
-rw-r--r--actions/admin/user/resetpassword.php2
-rw-r--r--actions/register.php6
-rw-r--r--actions/user/default_access.php4
-rw-r--r--actions/useradd.php14
4 files changed, 13 insertions, 13 deletions
diff --git a/actions/admin/user/resetpassword.php b/actions/admin/user/resetpassword.php
index e3f737974..d019a7f55 100644
--- a/actions/admin/user/resetpassword.php
+++ b/actions/admin/user/resetpassword.php
@@ -28,7 +28,7 @@ if (($user instanceof ElggUser) && ($user->canEdit())) {
system_message(elgg_echo('admin:user:resetpassword:yes'));
notify_user($user->guid,
- $CONFIG->site->guid,
+ elgg_get_site_entity()->guid,
elgg_echo('email:resetpassword:subject'),
elgg_echo('email:resetpassword:body', array($user->username, $password)),
NULL,
diff --git a/actions/register.php b/actions/register.php
index 1a0954e3b..33ee19aee 100644
--- a/actions/register.php
+++ b/actions/register.php
@@ -6,8 +6,6 @@
* @subpackage User.Account
*/
-global $CONFIG;
-
// Get variables
$username = get_input('username');
$password = get_input('password');
@@ -17,7 +15,7 @@ $name = get_input('name');
$friend_guid = (int) get_input('friend_guid', 0);
$invitecode = get_input('invitecode');
-if ($CONFIG->allow_registration) {
+if (elgg_get_config('allow_registration')) {
try {
if (trim($password) == "" || trim($password2) == "") {
throw new RegistrationException(elgg_echo('RegistrationException:EmptyPassword'));
@@ -52,7 +50,7 @@ if ($CONFIG->allow_registration) {
throw new RegistrationException(elgg_echo('registerbad'));
}
- system_message(elgg_echo("registerok", array($CONFIG->sitename)));
+ system_message(elgg_echo("registerok", array(elgg_get_site_entity()->name)));
// if exception thrown, this probably means there is a validation
// plugin that has disabled the user
diff --git a/actions/user/default_access.php b/actions/user/default_access.php
index 0c2390842..0b7d0bfbd 100644
--- a/actions/user/default_access.php
+++ b/actions/user/default_access.php
@@ -6,9 +6,7 @@
* @subpackage Core
*/
-global $CONFIG;
-
-if ($CONFIG->allow_user_default_access) {
+if (elgg_get_config('allow_user_default_access')) {
$default_access = get_input('default_access');
$user_id = get_input('guid');
diff --git a/actions/useradd.php b/actions/useradd.php
index dd6edfe31..0219361fb 100644
--- a/actions/useradd.php
+++ b/actions/useradd.php
@@ -7,7 +7,6 @@
*/
// Get variables
-global $CONFIG;
$username = get_input('username');
$password = get_input('password');
$password2 = get_input('password2');
@@ -33,12 +32,17 @@ try {
$new_user->created_by_guid = get_loggedin_userid();
$subject = elgg_echo('useradd:subject');
- $body = elgg_echo('useradd:body', array($name,
- $CONFIG->site->name, $CONFIG->site->url, $username, $password));
+ $body = elgg_echo('useradd:body', array(
+ $name,
+ elgg_get_site_entity()->name,
+ elgg_get_site_entity()->url,
+ $username,
+ $password,
+ ));
- notify_user($new_user->guid, $CONFIG->site->guid, $subject, $body);
+ notify_user($new_user->guid, elgg_get_site_entity()->guid, $subject, $body);
- system_message(elgg_echo("adduser:ok", array($CONFIG->sitename)));
+ system_message(elgg_echo("adduser:ok", array(elgg_get_site_entity()->name)));
} else {
register_error(elgg_echo("adduser:bad"));
}