예제 #1
0
        public ActionResult EditUser(String userName)
        {
            MembershipUser user          = Membership.GetUser(userName, true);
            UserEditModel  userEditModel = new UserEditModel();

            userEditModel.UserName = user.UserName;
            userEditModel.LastPasswordChangedDate = user.LastPasswordChangedDate;
            userEditModel.LastLoginDate           = user.LastLoginDate;
            userEditModel.IsLockedOut             = user.IsLockedOut;
            userEditModel.LastLockoutDate         = user.LastLockoutDate;
            userEditModel.IsApproved      = user.IsApproved;
            userEditModel.Email           = user.Email;
            userEditModel.CreationDate    = user.CreationDate;
            userEditModel.GetRolesForUser = Roles.GetRolesForUser(userName);
            userEditModel.Comment         = user.Comment;

            AuthenticationsAndAuthorizationsOperations anaOPs = new AuthenticationsAndAuthorizationsOperations();

            userEditModel.ExpiredDate = anaOPs.GetExpiryDate(userName);
            userEditModel.PhonePIN    = anaOPs.getMobilPINByUserName(userName);

            DocumentsOperations documentsOperations = new DocumentsOperations();

            userEditModel.PhoneAlias = anaOPs.GetMobileAliasByUserName(userName);
            return(View(userEditModel));
        }