aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/usersettings.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-13 19:01:29 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-13 19:01:29 +0000
commit11cc3f9f5b2551322e6c51a453291e7ecf5d364d (patch)
tree4f9cc3640227aa95b210676521422b530f9d6826 /engine/lib/usersettings.php
parentd433ae0d8adc2e615e1f3ef6c8a8603a0c5d214d (diff)
downloadelgg-11cc3f9f5b2551322e6c51a453291e7ecf5d364d.tar.gz
elgg-11cc3f9f5b2551322e6c51a453291e7ecf5d364d.tar.bz2
user settings library is now user_settings.php
git-svn-id: http://code.elgg.org/elgg/trunk@8203 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/usersettings.php')
-rw-r--r--engine/lib/usersettings.php89
1 files changed, 0 insertions, 89 deletions
diff --git a/engine/lib/usersettings.php b/engine/lib/usersettings.php
deleted file mode 100644
index f74c01975..000000000
--- a/engine/lib/usersettings.php
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-/**
- * Elgg user settings functions.
- * Functions for adding and manipulating options on the user settings panel.
- *
- * @package Elgg.Core
- * @subpackage Settings.User
- */
-
-/**
- * Set up the page for user settings
- *
- * @return void
- */
-function usersettings_pagesetup() {
- if (elgg_get_context() == "settings" && elgg_get_logged_in_user_guid()) {
- $user = elgg_get_logged_in_user_entity();
-
- $params = array(
- 'name' => '1_account',
- 'title' => elgg_echo('usersettings:user:opt:linktext'),
- 'url' => "pg/settings/user/{$user->username}",
- );
- elgg_register_menu_item('page', $params);
- $params = array(
- 'name' => '1_plugins',
- 'title' => elgg_echo('usersettings:plugins:opt:linktext'),
- 'url' => "pg/settings/plugins/{$user->username}",
- );
- elgg_register_menu_item('page', $params);
- $params = array(
- 'name' => '1_statistics',
- 'title' => elgg_echo('usersettings:statistics:opt:linktext'),
- 'url' => "pg/settings/statistics/{$user->username}",
- );
- elgg_register_menu_item('page', $params);
- }
-}
-
-/**
- * Page handler for user settings
- *
- * @param array $page Pages array
- *
- * @return void
- */
-function usersettings_page_handler($page) {
- global $CONFIG;
-
- if (!isset($page[0])) {
- $page[0] = 'user';
- }
-
- switch ($page[0]) {
- case 'statistics':
- $path = $CONFIG->path . "pages/settings/statistics.php";
- break;
- case 'plugins':
- $path = $CONFIG->path . "pages/settings/tools.php";
- break;
- case 'user':
- default:
- $path = $CONFIG->path . "pages/settings/account.php";
- break;
- }
-
- if ($page[1]) {
- $user = get_user_by_username($page[1]);
- elgg_set_page_owner_guid($user->guid);
- } else {
- elgg_set_page_owner_guid(elgg_get_logged_in_user_guid());
- }
-
- require($path);
-}
-
-/**
- * Initialise the admin page.
- *
- * @return void
- */
-function usersettings_init() {
- // Page handler
- register_page_handler('settings', 'usersettings_page_handler');
-}
-
-/// Register init function
-elgg_register_event_handler('init', 'system', 'usersettings_init');
-elgg_register_event_handler('pagesetup', 'system', 'usersettings_pagesetup');