Browse Source

! fix a couple of form errors with authentication form and redirect in Profile-Modify.php

Spuds 12 years ago
parent
commit
7475555c9f
2 changed files with 13 additions and 10 deletions
  1. 5 2
      Sources/Profile-Modify.php
  2. 8 8
      Themes/default/Profile.template.php

+ 5 - 2
Sources/Profile-Modify.php

@@ -1773,9 +1773,12 @@ function authentication($memID, $saving = false)
 				// Do the important bits.
 				updateMemberData($memID, array('openid_uri' => '', 'passwd' => $passwd));
 				if ($context['user']['is_owner'])
+				{
 					setLoginCookie(60 * $modSettings['cookieTime'], $memID, sha1(sha1(strtolower($cur_profile['member_name']) . un_htmlspecialchars($_POST['passwrd2'])) . $cur_profile['password_salt']));
-
-				redirectexit('action=profile;u=' . $memID);
+					redirectexit('action=profile;area=authentication;updated');
+				}
+				else
+					redirectexit('action=profile;u=' . $memID);
 			}
 
 			return true;

+ 8 - 8
Themes/default/Profile.template.php

@@ -2876,23 +2876,23 @@ function template_authentication_method()
 							<span class="smalltext">', $txt['required_security_reasons'], '</span>
 						</dt>
 						<dd>
-							<input type="password" name="oldpasswrd" size="20" style="margin-right: 4ex;" class="input_password" />
+							<input type="password" name="oldpasswrd" tabindex="', $context['tabindex']++, '" size="20" style="margin-right: 4ex;" class="input_password" />
 						</dd>
 					</dl>';
 
 	echo '
-					<div class="righttext">';
+					<hr class="hrcolor" />';
 
 	if (!empty($context['token_check']))
 		echo '
-						<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
+					<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
 
 	echo '
-						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-						<input type="hidden" name="u" value="', $context['id_member'], '" />
-						<input type="hidden" name="sa" value="', $context['menu_item_selected'], '" />
-						<input type="submit" value="', $txt['change_profile'], '" class="button_submit" />
-					</div>
+					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+					<input type="hidden" name="u" value="', $context['id_member'], '" />
+					<input type="hidden" name="sa" value="', $context['menu_item_selected'], '" />
+					<input type="submit" value="', $txt['change_profile'], '" class="button_submit" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>