mirror of
https://github.com/anonaddy/anonaddy
synced 2026-04-26 01:25:06 +02:00
automatic verified email when using proxy authentication
This commit is contained in:
@@ -52,15 +52,20 @@ function stripEmailExtension(string $email): string
|
||||
*
|
||||
* @return \App\Models\User
|
||||
*/
|
||||
function createUser(string $username, string $email, string|null $password = null)
|
||||
function createUser(string $username, string $email, string|null $password = null, bool $emailVerified = false)
|
||||
{
|
||||
$userId = Uuid::uuid4();
|
||||
|
||||
$recipient = Recipient::create([
|
||||
'email' => $email,
|
||||
'user_id' => $userId,
|
||||
'user_id' => $userId,
|
||||
]);
|
||||
|
||||
if ($emailVerified)
|
||||
{
|
||||
$recipient->markEmailAsVerified();
|
||||
}
|
||||
|
||||
$usernameModel = Username::create([
|
||||
'username' => $username,
|
||||
'user_id' => $userId,
|
||||
|
||||
Reference in New Issue
Block a user