commit
ed2000336d
|
|
@ -96,6 +96,7 @@ public class UserService : IUserService
|
||||||
}
|
}
|
||||||
|
|
||||||
User? user = record;
|
User? user = record;
|
||||||
|
var isAuthenticatedByHook = false;
|
||||||
var hooks = _services.GetServices<IAuthenticationHook>();
|
var hooks = _services.GetServices<IAuthenticationHook>();
|
||||||
if (record == null || record.Source != "internal")
|
if (record == null || record.Source != "internal")
|
||||||
{
|
{
|
||||||
|
|
@ -129,6 +130,8 @@ public class UserService : IUserService
|
||||||
};
|
};
|
||||||
await CreateUser(record);
|
await CreateUser(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isAuthenticatedByHook = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -138,13 +141,13 @@ public class UserService : IUserService
|
||||||
return default;
|
return default;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_setting.NewUserVerification && !record.Verified)
|
if (!isAuthenticatedByHook && _setting.NewUserVerification && !record.Verified)
|
||||||
{
|
{
|
||||||
return default;
|
return default;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
#if !DEBUG
|
||||||
if (Utilities.HashText(password, record.Salt) != record.Password)
|
if (!isAuthenticatedByHook && Utilities.HashText(password, record.Salt) != record.Password)
|
||||||
{
|
{
|
||||||
return default;
|
return default;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue