pub fn reset_login_failure_count(user_uuid: UserUuid, conn: &PgConnection) -> BackendResult<()> {
        use crate::schema::users::{
            self,
            dsl::*,
        };

        let target = users.filter(users::uuid.eq(user_uuid.0));
        diesel::update(target)
            .set(failed_login_count.eq(0))
            .execute(conn)
            .map_err(handle_err::<User>)?;
        Ok(())
    }
/// Resets the login failure count to 0.
/// This should be called after the user logs in successfully.
Resets the login failure count to 0.
This should be called after the user logs in successfully.
Resets the login failure count to 0 . This should be called after the user logs in successfully .
pub fn reset_login_failure_count(user_uuid: UserUuid, conn: &PgConnection) -> BackendResult<()> {
        use crate::schema::users::{
            self,
            dsl::*,
        };
        let target = users.filter(users::uuid.eq(user_uuid.0));
        diesel::update(target)
            .set(failed_login_count.eq(0))
            .execute(conn)
            .map_err(handle_err::<User>)?;
        Ok(())
    }
pub fn reset_login_failure_count ( user_uuid : UserUuid , conn : & PgConnection ) -> BackendResult < ( ) > { use crate :: schema :: users :: { self , dsl :: * , } ; let target = users . filter ( users :: uuid . eq ( user_uuid . 0 ) ) ; diesel :: update ( target ) . set ( failed_login_count . eq ( 0 ) ) . execute ( conn ) . map_err ( handle_err :: < User > ) ? ; Ok ( ( ) ) }
Resets the login failure count to 0.
Resets the login failure count to 0 .
user_uuid
UserUuid
conn
&PgConnection
user_uuid
UserUuid
conn
&PgConnection