1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 04:10:38 +02:00

Error message fix.

This commit is contained in:
Cameron
2016-08-19 16:12:58 -07:00
parent c7bc7ff6d1
commit eac663e889

View File

@@ -342,7 +342,7 @@ e107::getMessage()->addDebug("<h5>Posted Changes</h5>".print_a($changedUserData,
{ // Invalid data - from hooked in trigger event { // Invalid data - from hooked in trigger event
$message = "<div style='text-align:center'>".$ret."</div>"; $message = "<div style='text-align:center'>".$ret."</div>";
$caption = LAN_OK; $caption = LAN_OK;
$error = TRUE; $error = true;
} }
} }
} // End - update setttings } // End - update setttings
@@ -431,7 +431,7 @@ if ($dataToSave)
{ {
if ($_uid && ADMIN) if ($_uid && ADMIN)
{ // Admin is changing it { // Admin is changing it
$error = LAN_USET_20; $extraErrors[] = LAN_USET_20;
} }
else else
{ // User is changing their own info { // User is changing their own info
@@ -444,7 +444,7 @@ if ($dataToSave)
if ($dataToSave && !$promptPassword) if ($dataToSave && !$promptPassword)
{ {
$inp = intval($inp); $inp = intval($inp);
$message = LAN_USET_41;
// We can update the basic user record now - can just update fields from $changedUserData // We can update the basic user record now - can just update fields from $changedUserData
if (US_DEBUG) { $admin_log->e_log_event(10, debug_backtrace(), "DEBUG", "Usersettings test", "Changed data:<br /> ".var_export($changedUserData, true), false, LOG_TO_ROLLING); } if (US_DEBUG) { $admin_log->e_log_event(10, debug_backtrace(), "DEBUG", "Usersettings test", "Changed data:<br /> ".var_export($changedUserData, true), false, LOG_TO_ROLLING); }
@@ -457,10 +457,11 @@ if ($dataToSave && !$promptPassword)
// print_a($changedData); // print_a($changedData);
if (FALSE === $sql->update('user', $changedData)) if (FALSE === $sql->update('user', $changedData))
{ {
$message .= '<br />'.LAN_USET_43; $extraErrors[] = LAN_USET_43;
} }
else else
{ {
$message = LAN_USET_41;
if (isset($changedUserData['user_password']) && !$adminEdit) if (isset($changedUserData['user_password']) && !$adminEdit)
{ {
// echo "Make new cookie<br />"; // echo "Make new cookie<br />";