Example #1
0
        public BaseResponse UpdatePassword(string userName, string newPassword, bool debug)
        {
            methodName = "UpdatePassword";
            
            try
            {
                #region validate input
                // All params are required.
                if ((userName.Trim() == "") || (newPassword.Trim() == ""))
                {
                    baseResponse.Messages.Add(new Message("ImproperValidationCriteriaException"));
                    return baseResponse;
                }
                #endregion

                UpdatePasswordRequest request = new UpdatePasswordRequest(userName, newPassword, debug);
                baseResponse = UserMaintenance.UpdatePassword(request);
                if (baseResponse != null
                    && baseResponse.TypedResponse != null
                    && baseResponse.TypedResponse.GetType().Name == "UpdatePasswordResponse"
                    && (baseResponse.TypedResponse as UpdatePasswordResponse).Success)
                {
                    HarperACL.Authenticator.UpdateAHPassword(userName, newPassword);
                }
            }
            catch (Exception ex)
            {
                LogMethodError(methodName, ex);
            }
            
            return baseResponse;
        }        
Example #2
0
 public static BaseResponse UpdatePassword(UpdatePasswordRequest ahRequest)
 {
     return GetResponse(Methods.UPDATEPASSWORD, ahRequest);
 }