Esempio n. 1
0
        public void RenameUser(string oldUserName, string newUserName)
        {
            oldUserName = oldUserName.ToLower();
            User user = (User)GraffitiUsers.GetUser(oldUserName);

            user.Name = newUserName;
            GraffitiUsers.Save(user, null);
        }
Esempio n. 2
0
        public bool ChangePassword(string username, string old_password, string new_password)
        {
            username = username.ToLower();
            User user = Login(username, old_password) as User;

            if (user != null)
            {
                user.Password = new_password;
                GraffitiUsers.Save(user, null);
                return(true);
            }

            return(false);
        }
Esempio n. 3
0
        public bool ChangePassword(string username, string password)
        {
            username = username.ToLower();
            User user = User.FetchByColumn(User.Columns.Name, username);

            if (!user.IsNew)
            {
                user.Password = password;
                GraffitiUsers.Save(user, null);
                return(true);
            }

            return(false);
        }