Email template admin_login

When editing the site text, I discovered: user_notifications.admin_login.text_body_template

When is this triggered at all? The default body template is:

Somebody asked to log in to your account on %{site_name}.

If you did not make this request, you can safely ignore this email.

Click the following link to log in:
%{base_url}/session/email-login/%{email_token}

1 Like

You can edit email templates via your site’s email settings. Here’s the direct link:

https://yoursite/admin/email/templates/user_notifications.admin_login

That is how i discovered it.

My question is how is the email generated in the first place?

Oh I see what you mean. Sorry I misunderstood.

That email is sent when you log in using the "Skip the password; email me a login link: method.

I think that specific one (user_notifications.admin_login.text_body_template) is triggered from logging in on the /u/admin-login page. :+1:

1 Like

You are right! I tested the regular email login but didn’t notice it says “Here’s your link to log in at..” instead of “Somebody asked..” Otherwise it’s almost the same.

1 Like

When would an admin use this as opposed to the regular log in button?

A better question might be, the option to log in this way exists for a reason, what?

2 Likes

The /u/admin-login is often referred to as an admin ‘backdoor’. It’s one of the tools that can be used when a misconfiguration has blocked normal login. I think I’ve seen it most used for SSO snafus.

The checkbox to enable safe mode at the same time is also quite handy. :slight_smile:

2 Likes