mirror of
https://forgejo.ellis.link/continuwuation/continuwuity/
synced 2026-05-17 01:25:05 +00:00
fix: Fix M_NOT_FOUND for users with no origin set
This commit is contained in:
@@ -58,7 +58,14 @@ pub async fn issue_token(&self, user_id: OwnedUserId) -> Result<ValidResetToken>
|
||||
return Err!("Cannot issue a password reset token for the server user");
|
||||
}
|
||||
|
||||
if self.services.users.origin(&user_id).await? != "password" {
|
||||
if self
|
||||
.services
|
||||
.users
|
||||
.origin(&user_id)
|
||||
.await
|
||||
.unwrap_or_else(|_| "password".to_owned())
|
||||
!= "password"
|
||||
{
|
||||
return Err!("Cannot issue a password reset token for non-internal user {user_id}");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user