improve notify_admin email
This commit is contained in:
parent
1a85ab8dcc
commit
62daf5eadb
|
@ -109,7 +109,13 @@ def facebook_callback():
|
||||||
|
|
||||||
flash(f"Welcome to SimpleLogin {user.name}!", "success")
|
flash(f"Welcome to SimpleLogin {user.name}!", "success")
|
||||||
|
|
||||||
notify_admin(f"new user {user.name} {user.email} signs up via facebook")
|
notify_admin(
|
||||||
|
f"new user {user.name} {user.email} signs up via facebook",
|
||||||
|
html_content=f"""
|
||||||
|
name: {user.name} <br>
|
||||||
|
email: {user.email} <br>
|
||||||
|
""",
|
||||||
|
)
|
||||||
|
|
||||||
# The activation link contains the original page, for ex authorize page
|
# The activation link contains the original page, for ex authorize page
|
||||||
if "facebook_next_url" in session:
|
if "facebook_next_url" in session:
|
||||||
|
|
|
@ -93,7 +93,12 @@ def github_callback():
|
||||||
|
|
||||||
flash(f"Welcome to SimpleLogin {user.name}!", "success")
|
flash(f"Welcome to SimpleLogin {user.name}!", "success")
|
||||||
|
|
||||||
notify_admin(f"new user {user.name} {user.email} signs up via github")
|
notify_admin(
|
||||||
|
f"new user {user.name} {user.email} signs up via github",
|
||||||
|
html_content=f"""
|
||||||
|
name: {user.name} <br>
|
||||||
|
email: {user.email} <br>""",
|
||||||
|
)
|
||||||
|
|
||||||
# The activation link contains the original page, for ex authorize page
|
# The activation link contains the original page, for ex authorize page
|
||||||
if "next" in request.args:
|
if "next" in request.args:
|
||||||
|
|
|
@ -108,7 +108,12 @@ def google_callback():
|
||||||
|
|
||||||
flash(f"Welcome to SimpleLogin {user.name}!", "success")
|
flash(f"Welcome to SimpleLogin {user.name}!", "success")
|
||||||
|
|
||||||
notify_admin(f"new user {user.name} {user.email} signs up via google")
|
notify_admin(
|
||||||
|
f"new user {user.name} {user.email} signs up via google",
|
||||||
|
html_content=f"""
|
||||||
|
name: {user.name} <br>
|
||||||
|
email: {user.email} <br>""",
|
||||||
|
)
|
||||||
|
|
||||||
# The activation link contains the original page, for ex authorize page
|
# The activation link contains the original page, for ex authorize page
|
||||||
if "google_next_url" in session:
|
if "google_next_url" in session:
|
||||||
|
|
|
@ -44,7 +44,10 @@ def register():
|
||||||
|
|
||||||
send_activation_email(user, next_url)
|
send_activation_email(user, next_url)
|
||||||
notify_admin(
|
notify_admin(
|
||||||
f"new user {user.name} {user.email} signs up via email/password"
|
f"new user {user.name} {user.email} signs up via email/password",
|
||||||
|
html_content=f"""
|
||||||
|
name: {user.name} <br>
|
||||||
|
email: {user.email} <br>""",
|
||||||
)
|
)
|
||||||
|
|
||||||
return render_template("auth/register_waiting_activation.html")
|
return render_template("auth/register_waiting_activation.html")
|
||||||
|
|
|
@ -22,7 +22,14 @@ def new_client():
|
||||||
client = Client.create_new(form.name.data, current_user.id)
|
client = Client.create_new(form.name.data, current_user.id)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
notify_admin(f"user {current_user} created new app {client.name}")
|
notify_admin(
|
||||||
|
f"user {current_user} created new app {client.name}",
|
||||||
|
html_content=f"""
|
||||||
|
name: {current_user.name} <br>
|
||||||
|
email: {current_user.email} <br>
|
||||||
|
app: {client.name}
|
||||||
|
""",
|
||||||
|
)
|
||||||
flash("Your app has been created", "success")
|
flash("Your app has been created", "success")
|
||||||
|
|
||||||
return redirect(
|
return redirect(
|
||||||
|
|
Loading…
Reference in New Issue