コード例 #1
0
        public static bool ResetPassword(string userAccount, string newPassword)
        {
            if (string.IsNullOrWhiteSpace(userAccount))
            {
                throw new ArgumentNullException("userAccount");
            }
            if (string.IsNullOrWhiteSpace(newPassword))
            {
                throw new ArgumentNullException("newPassword");
            }

            ISysUser factory = SysUserFactory.GetFactory();
            bool     result  = factory.ResetPassword(userAccount, newPassword);

            if (result)
            {
                OperateLogServices.AddOperateLog(OperateType.Update, string.Format("userAccount:{0},修改密码为:{1}", userAccount, newPassword));
            }
            return(result);
        }