fix: Fix M_NOT_FOUND for users with no origin set

This commit is contained in:
Ginger authored and Ellis Git committed 2026-03-09 16:13:55 +00:00
1 parent 73a5e1232f
commit c8d084fb6d
1 file changed
+8 -1
+8 -1
View File
@@ -58,7 +58,14 @@ impl Service {
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}");
}