mirror of
https://github.com/simple-login/app.git
synced 2024-11-18 06:31:27 +08:00
Use FIRST_ALIAS_DOMAIN to create first alias
This commit is contained in:
parent
8ebc26f4e7
commit
28101612db
1 changed files with 2 additions and 1 deletions
|
@ -21,6 +21,7 @@ from app.config import (
|
|||
JOB_ONBOARDING_3,
|
||||
JOB_ONBOARDING_4,
|
||||
LANDING_PAGE_URL,
|
||||
FIRST_ALIAS_DOMAIN,
|
||||
)
|
||||
from app.extensions import db
|
||||
from app.log import LOG
|
||||
|
@ -622,7 +623,7 @@ class Alias(db.Model, ModelMixin):
|
|||
# find the right suffix - avoid infinite loop by running this at max 1000 times
|
||||
for i in range(1000):
|
||||
suffix = random_word()
|
||||
email = f"{prefix}.{suffix}@{EMAIL_DOMAIN}"
|
||||
email = f"{prefix}.{suffix}@{FIRST_ALIAS_DOMAIN}"
|
||||
|
||||
if not cls.get_by(email=email):
|
||||
break
|
||||
|
|
Loading…
Reference in a new issue