pub async fn invalidate_all_user_sessions(
pool: &Pool<MySql>,
user_id: i64,
) -> Result<()>Expand description
Invalidates all sessions for a user.
This function marks all of a user’s sessions as inactive, effectively logging them out of all devices.
§Arguments
pool- Database connection pool for executing the queryuser_id- The ID of the user whose sessions should be invalidated
§Returns
Ok(())- Successfully invalidated all sessionsErr(anyhow::Error)- Failed to invalidate sessions