equal
deleted
inserted
replaced
1 use mysql; |
1 use mysql; |
2 use mysql::{error::DriverError, error::Error, from_row_opt, params}; |
2 use mysql::{error::DriverError, error::Error, from_row_opt, params}; |
3 use openssl::sha::sha1; |
3 use openssl::sha::sha1; |
4 |
4 |
5 use super::handlers::AccountInfo; |
5 use crate::{ |
6 use crate::server::handlers::Sha1Digest; |
6 handlers::{Sha1Digest, AccountInfo} |
|
7 }; |
7 |
8 |
8 const GET_ACCOUNT_QUERY: &str = |
9 const GET_ACCOUNT_QUERY: &str = |
9 r"SELECT CASE WHEN users.status = 1 THEN users.pass ELSE '' END, |
10 r"SELECT CASE WHEN users.status = 1 THEN users.pass ELSE '' END, |
10 (SELECT COUNT(users_roles.rid) FROM users_roles WHERE users.uid = users_roles.uid AND users_roles.rid = 3), |
11 (SELECT COUNT(users_roles.rid) FROM users_roles WHERE users.uid = users_roles.uid AND users_roles.rid = 3), |
11 (SELECT COUNT(users_roles.rid) FROM users_roles WHERE users.uid = users_roles.uid AND users_roles.rid = 13) |
12 (SELECT COUNT(users_roles.rid) FROM users_roles WHERE users.uid = users_roles.uid AND users_roles.rid = 13) |