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,
* @subpackage User.Account
*/
-global $CONFIG;
-
// Get variables
$username = get_input('username');
$password = get_input('password');
$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'));
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
* @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');
*/
// Get variables
-global $CONFIG;
$username = get_input('username');
$password = get_input('password');
$password2 = get_input('password2');
$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"));
}
// create the registration url - including switching to https if configured
$register_url = elgg_get_site_url() . 'action/register';
-if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) {
+if (elgg_get_config('https_login')) {
$register_url = str_replace("http:", "https:", $register_url);
}
$form_params = array('action' => $register_url);
}
if (!$success) {
- global $CONFIG;
$path = elgg_view('icon/user/default/'.$size);
header("Location: {$path}");
exit;
$users_stats = get_number_users();
$total_users = get_number_users(true);
-global $CONFIG;
-
// Get version information
$version = get_version();
$release = get_version(true);
<?php
-
+/**
+ * User hover wrapper
+ */
?>
echo elgg_view_menu('user_hover', $vars);
-// @todo change how to add on demand registration of menu items
-global $CONFIG;
-unset($CONFIG->menus['user_hover']);
*
*/
-global $CONFIG;
-
$class = $vars['class'];
if (!$class) {
$class = "elgg-submit-button";
$name = $vars['internalname'];
$src = $vars['src'];
// blank src if trying to access an offsite image.
-if (strpos($src,elgg_get_site_url())===false) {
+if (strpos($src, elgg_get_site_url()) === false) {
$src = "";
}
?>