Merge branch 'main' of gitlab.com:PhilippHofer/rot
This commit is contained in:
commit
71ac00ec36
@ -111,6 +111,7 @@ ORDER BY last_access DESC
|
|||||||
|
|
||||||
pub async fn login(db: &SqlitePool, name: &str, pw: &str) -> Result<Self, LoginError> {
|
pub async fn login(db: &SqlitePool, name: &str, pw: &str) -> Result<Self, LoginError> {
|
||||||
info!("User '{name}' is trying to login...");
|
info!("User '{name}' is trying to login...");
|
||||||
|
let name = name.trim(); // just to make sure...
|
||||||
let Some(user) = User::find_by_name(db, name).await else {
|
let Some(user) = User::find_by_name(db, name).await else {
|
||||||
info!("Username ({name}) not found");
|
info!("Username ({name}) not found");
|
||||||
return Err(LoginError::InvalidAuthenticationCombo); // Username not found
|
return Err(LoginError::InvalidAuthenticationCombo); // Username not found
|
||||||
|
Loading…
Reference in New Issue
Block a user