diff --git a/Site/App_GlobalResources/Global.designer.cs b/Site/App_GlobalResources/Global.designer.cs index b39be29e..f96ca27d 100644 --- a/Site/App_GlobalResources/Global.designer.cs +++ b/Site/App_GlobalResources/Global.designer.cs @@ -1482,6 +1482,24 @@ namespace Resources { } } + /// + /// Looks up a localized string similar to Reset User Password?. + /// + internal static string Master_EditPersonResetPasswordConfirm_Header { + get { + return ResourceManager.GetString("Master_EditPersonResetPasswordConfirm_Header", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You're resetting a user password. This user will receive a reset link by mail, which they can click to reset their Swarmops password.<br/><br/><strong>Never do this unless specifically asked for assistance with this by the user.</strong><br/><br/>Proceed with password reset procedure?. + /// + internal static string Master_EditPersonResetPasswordConfirm_Text { + get { + return ResourceManager.GetString("Master_EditPersonResetPasswordConfirm_Text", resourceCulture); + } + } + /// /// Looks up a localized string similar to Mail a password-reset link. /// @@ -1492,7 +1510,34 @@ namespace Resources { } /// - /// Looks up a localized string similar to This doesn't look like a valid phone number, but we're storing it as written here.. + /// Looks up a localized string similar to Password Reset Prohibited. + /// + internal static string Master_EditPersonResetPasswordProhibited_Header { + get { + return ResourceManager.GetString("Master_EditPersonResetPasswordProhibited_Header", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This user's mail address was recently changed (less than a week ago). For security reasons, a password reset link cannot and will not be sent to such a newly changed mail address.. + /// + internal static string Master_EditPersonResetPasswordProhibited_Text { + get { + return ResourceManager.GetString("Master_EditPersonResetPasswordProhibited_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A password reset link was sent to this user.. + /// + internal static string Master_EditPersonResetPassword_ResetLinkSent { + get { + return ResourceManager.GetString("Master_EditPersonResetPassword_ResetLinkSent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This doesn't look like a valid phone number, but we're storing it as written here nonetheless.. /// internal static string Master_EditPersonWarning_Phone { get { diff --git a/Site/App_GlobalResources/Global.resx b/Site/App_GlobalResources/Global.resx index 2b725c60..634ca3fe 100644 --- a/Site/App_GlobalResources/Global.resx +++ b/Site/App_GlobalResources/Global.resx @@ -756,7 +756,22 @@ Mail a password-reset link - This doesn't look like a valid phone number, but we're storing it as written here. - Trigges as a notice if phone misses a regexp. + This doesn't look like a valid phone number, but we're storing it as written here nonetheless. + Triggers as a notice if phone misses a regexp of 0-9, (), -, +, and space. + + + Reset User Password? + + + You're resetting a user password. This user will receive a reset link by mail, which they can click to reset their Swarmops password.<br/><br/><strong>Never do this unless specifically asked for assistance with this by the user.</strong><br/><br/>Proceed with password reset procedure? + + + Password Reset Prohibited + + + This user's mail address was recently changed (less than a week ago). For security reasons, a password reset link cannot and will not be sent to such a newly changed mail address. + + + A password reset link was sent to this user. \ No newline at end of file diff --git a/Site/Automation/SwarmFunctions.aspx.cs b/Site/Automation/SwarmFunctions.aspx.cs index 494adae1..9816f975 100644 --- a/Site/Automation/SwarmFunctions.aspx.cs +++ b/Site/Automation/SwarmFunctions.aspx.cs @@ -272,12 +272,16 @@ namespace Swarmops.Frontend.Automation AuthenticationData authData = GetAuthenticationDataAndCulture(); bool self = false; + // Are we modifying ourselves? + if (personId == 0) // request self record { self = true; // may make use of this later personId = authData.CurrentUser.Identity; } + // Preliminary input validation + if (string.IsNullOrEmpty (newValue)) { if (field != "TwitterId") // These fields may be set to empty; default is disallow @@ -292,7 +296,7 @@ namespace Swarmops.Frontend.Automation } } - // TODO: Verify authority to see and change personal data + // Verify authority to see and change personal data Person affectedPerson = Person.FromIdentity (personId); @@ -308,7 +312,10 @@ namespace Swarmops.Frontend.Automation string oldValue; string displayMessage = string.Empty; - newValue = newValue.Trim().Replace (" ", " "); + while (newValue.Contains (" ")) + { + newValue = newValue.Trim().Replace (" ", " "); // double, triple, quadruple spaces reduced to one + } switch (field) { diff --git a/Site/Master-v5.master b/Site/Master-v5.master index d6ab6c09..0eae557e 100644 --- a/Site/Master-v5.master +++ b/Site/Master-v5.master @@ -1,4 +1,5 @@ <%@ Master Language="C#" AutoEventWireup="true" Inherits="Swarmops.Frontend.MasterV5" Codebehind="Master-v5.master.cs" %> +<%@ Import Namespace="System.Runtime.CompilerServices" %> @@ -50,8 +51,11 @@ - + @@ -131,7 +138,7 @@
-
|
+
|
| 
|
| 
@@ -249,7 +256,7 @@

PERSONNAME:

- ​
+ ​