Esempio n. 1
0
        public static bool unlock_user(Guid?applicationId, string username)
        {
            Guid?userId = UsersController.get_user_id(applicationId, username);
            User u      = new User();

            return(userId.HasValue && DataProvider.Locked(userId.Value, false, ref u));
        }
Esempio n. 2
0
        public static bool set_pass_reset_ticket(Guid applicationId, string username, Guid ticket,
                                                 string email, string emailSubject, string emailBody, bool sendEmail = true)
        {
            Guid?userId = UsersController.get_user_id(applicationId, username);

            return(userId.HasValue && set_pass_reset_ticket(applicationId, userId.Value, ticket, email, emailSubject, emailBody, sendEmail));
        }
Esempio n. 3
0
        public static bool set_password(Guid?applicationId, string username, string password,
                                        bool ignorePasswordPolicy, bool autoGenerated, ref string errorMessage)
        {
            Guid?userId = UsersController.get_user_id(applicationId, username);

            return(userId.HasValue && UsersController.set_password(applicationId, userId.Value, password,
                                                                   ignorePasswordPolicy, autoGenerated, ref errorMessage));
        }
Esempio n. 4
0
        public static void get_current_password(Guid?applicationId, string username,
                                                ref string password, ref string passwordSalt)
        {
            Guid?userId = UsersController.get_user_id(applicationId, username);

            if (userId.HasValue)
            {
                UsersController.get_current_password(userId.Value, ref password, ref passwordSalt);
            }
        }
Esempio n. 5
0
        public static int login_attempt(Guid?applicationId, string username, bool succeed)
        {
            Guid?userId = UsersController.get_user_id(applicationId, username);

            return(!userId.HasValue ? 0 : DataProvider.LoginAttempt(userId.Value, succeed));
        }
Esempio n. 6
0
        public static bool locked(Guid?applicationId, string username, ref User theUser)
        {
            Guid?userId = UsersController.get_user_id(applicationId, username);

            return(userId.HasValue && DataProvider.Locked(userId.Value, null, ref theUser));
        }
Esempio n. 7
0
        public static Guid?get_pass_reset_ticket(Guid applicationId, string username)
        {
            Guid?userId = UsersController.get_user_id(applicationId, username);

            return(!userId.HasValue ? null : get_pass_reset_ticket(userId.Value));
        }