Exemplo n.º 1
0
        public ActionResult Index()
        {
            var user   = _Storage.GetCurrentUser();
            var groups = _Storage.GetGroupsByUser(user);

            return(View(new DetailsModel(user, groups)));
        }
Exemplo n.º 2
0
        public override bool ChangePassword(string username, string oldPassword, string newPassword)
        {
            try
            {
                if (username == _UserStorage.GetCurrentUser().Username)
                {
                    _UserStorage.ChangePassword(new ChangePasswordModel {
                        NewPassword = newPassword, OldPassword = oldPassword
                    });

                    return(true);
                }
            }
            catch (Exception)
            {
            }

            return(false);
        }
Exemplo n.º 3
0
 public User GetCurrentUser()
 {
     return(_UserStorage.GetCurrentUser());
 }
Exemplo n.º 4
0
        public ActionResult Index()
        {
            var user = _Storage.GetCurrentUser();

            return(View(new DetailsModel(user)));
        }