1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-03 05:07:27 +02:00

More usersettings clean-up

This commit is contained in:
Cameron
2016-11-26 14:11:22 -08:00
parent dd2cebbb3c
commit 0c102f0a45

View File

@@ -56,8 +56,6 @@ require_once(e_HANDLER.'validator_class.php');
class usersettings_front // Begin Usersettings rewrite. class usersettings_front // Begin Usersettings rewrite.
{ {
@@ -86,7 +84,12 @@ class usersettings_front // Begin Usersettings rewrite.
else else
{ {
global $sc_style; global $sc_style;
include_once (e107::coreTemplatePath('usersettings')); //correct way to load a core template. $USERSETTINGS_MESSAGE = '';
$USERSETTINGS_MESSAGE_CAPTION = '';
$USERSETTINGS_EDIT_CAPTION = '';
$USERSETTINGS_EDIT = '';
$coreTemplatePath = e107::coreTemplatePath('usersettings');
include_once($coreTemplatePath); //correct way to load a core template.
e107::scStyle($sc_style); e107::scStyle($sc_style);
$usersettings_shortcodes = e107::getScBatch('usersettings'); $usersettings_shortcodes = e107::getScBatch('usersettings');
} }
@@ -136,17 +139,25 @@ class usersettings_front // Begin Usersettings rewrite.
$photo_to_delete = ''; $photo_to_delete = '';
$avatar_to_delete = ''; $avatar_to_delete = '';
$ue_fields = ''; // $ue_fields = '';
$caption = '';
$promptPassword = false; $promptPassword = false;
$error = FALSE; $error = FALSE;
$extraErrors = array(); $extraErrors = array();
$eufVals = array(); $eufVals = array();
$savePassword = ''; $savePassword = '';
$changedUserData = array();
$udata = array();
$allData = array();
$message = '';
$changedEUFData = array();
$inp = USERID; // Initially assume that user is modifying their own data. $inp = USERID; // Initially assume that user is modifying their own data.
$_uid = false; // FALSE if user modifying their own data; otherwise ID of data being modified $_uid = false; // FALSE if user modifying their own data; otherwise ID of data being modified
$adminEdit = false; // @deprecated // FALSE if editing own data. TRUE if admin edit $adminEdit = false; // @deprecated // FALSE if editing own data. TRUE if admin edit
/* todo subject of removal */
if(is_numeric(e_QUERY)) if(is_numeric(e_QUERY))
{ // Trying to edit specific user record { // Trying to edit specific user record
if (ADMIN) if (ADMIN)
@@ -312,7 +323,7 @@ class usersettings_front // Begin Usersettings rewrite.
} }
// Validate Extended User Fields. // Validate Extended User Fields.
$changedEUFData = array();
if (isset($_POST['ue'])) if (isset($_POST['ue']))
{ {
$eufVals = $ue->userExtendedValidateAll($_POST['ue'], varset($_POST['hide'],TRUE)); // Validate the extended user fields $eufVals = $ue->userExtendedValidateAll($_POST['ue'], varset($_POST['hide'],TRUE)); // Validate the extended user fields
@@ -732,6 +743,7 @@ class usersettings_front // Begin Usersettings rewrite.
$this->renderForm($changedUserData); $this->renderForm($changedUserData);
return false;
} }
@@ -940,7 +952,7 @@ class usersettings_front // Begin Usersettings rewrite.
} }
$us = new usersettings_front; $us = new usersettings_front;
require_once (HEADERF); require_once(HEADERF);
$us->init(); $us->init();
require_once (FOOTERF); require_once (FOOTERF);