Sending the user an email when admin approves their account? Topic is solved

Need help with the Administration of your Joomla! 3.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Hakunamatata
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Mon Jan 20, 2020 2:05 pm

Sending the user an email when admin approves their account?

Post by Hakunamatata » Thu Apr 29, 2021 12:09 pm

Hi,

I have to approve new users accounts on my website.
But it seems the users don't get any notification when I validate their account.

Is there any setting or plugin to do that?

Thanks

User avatar
AMurray
Joomla! Champion
Joomla! Champion
Posts: 7249
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Sending the user an email when admin approves their account?

Post by AMurray » Thu Apr 29, 2021 10:36 pm

That should be working by default. https://docs.joomla.org/Enabling_user%2 ... _by_admins states the basic work-flow involved, it doesn't mention anything about having to turn on the email feature for notifying the registered user.

Perhaps it is the user's end - the email in their spam folder?

Check the global config settings, make sure Joomla is sending emails, generally.

It is strange, since the user receives the email in the first place to verify the email address, before you get the notification requesting it to be activated - so somewhere along the line, Joomla is sending those messages to the user and site administrator.
Regards - A Murray

Hakunamatata
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Mon Jan 20, 2020 2:05 pm

Re: Sending the user an email when admin approves their account?

Post by Hakunamatata » Fri Apr 30, 2021 6:11 am

Yes, the users receive the activation link email, but not the one after I validate their account.
How weird is it...

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 11215
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Sending the user an email when admin approves their account?

Post by sozzled » Fri Apr 30, 2021 6:25 am

Hmmm ... see viewtopic.php?f=706&t=981516 ??? Does this apply here?
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

Hakunamatata
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Mon Jan 20, 2020 2:05 pm

Re: Sending the user an email when admin approves their account?

Post by Hakunamatata » Fri Apr 30, 2021 11:55 am

sozzled wrote:
Fri Apr 30, 2021 6:25 am
Hmmm ... see viewtopic.php?f=706&t=981516 ??? Does this apply here?
Yes, same issue, but no solution there :(

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 40476
Joined: Sat Apr 05, 2008 9:58 pm

Re: Sending the user an email when admin approves their account?

Post by Webdongle » Fri Apr 30, 2021 6:24 pm

Is your SA user's email your domain suffix or google etc?

Is this related? https://issues.joomla.org/tracker/joomla-cms/27774
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

Hakunamatata
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Mon Jan 20, 2020 2:05 pm

Re: Sending the user an email when admin approves their account?

Post by Hakunamatata » Sat May 01, 2021 6:21 am

Sorry I don't understand your first question.

I don't think it is related to the topic as I don't have any error message when activating new accounts.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 40476
Joined: Sat Apr 05, 2008 9:58 pm

Re: Sending the user an email when admin approves their account?

Post by Webdongle » Sat May 01, 2021 8:05 am

You are logged in as Super Administrator when you authorise the new user. Is your email address you@yoursite.com or you@google.com or you@gmail.com or ...
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

Hakunamatata
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Mon Jan 20, 2020 2:05 pm

Re: Sending the user an email when admin approves their account?

Post by Hakunamatata » Sat May 01, 2021 3:20 pm

Webdongle wrote:
Sat May 01, 2021 8:05 am
You are logged in as Super Administrator when you authorise the new user. Is your email address you@yoursite.com or you@google.com or you@gmail.com or ...
I'm using an email like contact@mysite.com, not a Gmail or free service.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 40476
Joined: Sat Apr 05, 2008 9:58 pm

Re: Sending the user an email when admin approves their account?

Post by Webdongle » Sat May 01, 2021 4:11 pm

Does the notification email fail to reach the newly registered user all the time or only sometimes?
PM me a url so I can test see if my email gets the notification?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 11215
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Sending the user an email when admin approves their account?

Post by sozzled » Sat May 01, 2021 7:59 pm

This is what I know:
  1. According to the documentation (that was written nearly ten years ago)
    • After registering the new user receives an e-mail message containing a link with a token to verify their e-mail address;
    • After the user's e-mail address has been verified, all users with the Receive System Messages option enabled will receive an e-mail message notifying them that a user has verified their e-mail address and requests that their account be activated. That email message will contain a link with a token to activate the account;
    • Once an administrator has activated the account, the user will receive an e-mail message notifying them that they may now login.
    That's how I understand the process to work and that's how @Hakunamatata understands the process to work.
    /
  2. I tested the process about seven months ago and reported to the forum
    sozzled wrote:
    Thu Aug 13, 2020 9:18 pm
    I spent about fifteen minutes trying this out on a test site and I had to give up. It seems, from the instructions, that the end user—the one requesting a new account to be approved by the admin—should receive an email after someone issues that approval.

    From my reading of things: (1) a person fills in the account registration form, (2) the person then receives an email containing an email-validation token, (3) the system admin receives an email notifying them that an account registration, which has a valid email address (obviously), containing a link to activate the account, (4) the admin logs in and activates the account, and then (5) the original user receives an email notifying them that they can login.

    I couldn't get step (4) to work. I received the emails all right and I clicked the "activation link" in step (3) but, when I followed the link (and logged-in) I got a "You are not authorised to view this resource" error. Even so, when I logged into the backend and "manually" activated the account, no email was sent to the registrant. As I wrote earlier, I haven't spent much time experimenting with admin-approved registrations and it's not a matter that consumes my time a lot. So, I have put this matter on hold for when I have nothing else to do.

    I'm sorry that I wasn't much help. Not knowing exactly how the OP went about performing the approval, I really can't offer anything else to this discussion, sorry. I believe that things should work but I don't know enough to assist.
I have not been able get this to work myself (not that it's a matter of great importance to me because I don't use the feature). When I reported this back in August last year, the discussion went dead and there was no follow up. I don't know anyone who has successfully made this work but, by the same token, many of my questions to this forum remain unanswered. It's possible that the process works (but I haven't seen any confirmation of it) and it's possible that the process doesn't work (and I don't know if there's any plan to remediate the issue as a bug fix).

If it's important to address this as a problem then those people who feel it is important need to chase things up.

I can't see many issues on the Issue Tracker (open or closed) addressing the matter but I have my doubts about the accuracy of the Issue Tracker in any case. The one case I found was here: https://issues.joomla.org/tracker/joomla-cms/20282.

It is worth reading @brian's article on this: https://brian.teeman.net/joomla/870-aut ... omla-users (even though it was written 4¼ years ago). Brian's conclusion—I hope my understanding of it is correct—was: "[It would be better] if someone looked at resolving this directly in the Joomla core."

The key point that @brian made in his article was this:
[T]here is no code at all to send an email to the user if you activate them from the admin interface - so they never know that they have been approved and can use the web site. This has been reported as a bug several times and is a regular report on the Joomla forum - see https://github.com/joomla/joomla-cms/issues/13620
When you follow the GitHub discussion for https://github.com/joomla/joomla-cms/issues/13620 the matter was "closed by a PR". If you follow the PR discussion, the fix was decommisioned for J! 3.x in February last year with the comment "To be rebased for J4".

It is for people to form their own opinion on the issue and use the option (New User Account Activation = Administrator) [or not] as they choose. If the process works as documented (i.e. the new account is notified by email when an administrator approves the request) so much the better. If it doesn't work then raise the matter here on the forum as @Hakunamatata has done and see if the question can be answered; as an alternative, raise the matter at GitHub and see what happens there; as another alternative, use https://joomla.stackexchange.com/.

It should not be difficult for people to test this for themselves using their own test sites. ;) I don't think the mechanism works as documented because, as @brian wrote, "there is no code at all to send an email to the user if you activate them from the admin interface."

That's all that I can say about the matter. 8)
Last edited by sozzled on Sat May 01, 2021 9:43 pm, edited 1 time in total.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 40476
Joined: Sat Apr 05, 2008 9:58 pm

Re: Sending the user an email when admin approves their account?

Post by Webdongle » Sat May 01, 2021 9:38 pm

On my site registered a spare email address
register 01.png
Received email to the registering email address
register 02.png
Clicked the link and
register 03.png
My admin account received the email
register 04.png
Clicked the link and was taken to the site. Clicked to activate and was presented with the frontend login screen. Logged in with my admin account
And saw
register 05.png


The email address I registered with received the conformation email

FULL SUCCESS
You do not have the required permissions to view the files attached to this post.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 11215
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Sending the user an email when admin approves their account?

Post by sozzled » Sat May 01, 2021 9:52 pm

Thank you, @Webdongle! I really appreciate the time you invested in investigating the matter. As I wrote (back in August last year) I tried and failed and when I reported my findings the discussion went dead. That's a fairly common occurrence when I write on this forum. :laugh:

I'm not Robinson Crusoe in this issue as it seems. Several people have contributed to the discussion over the years and the discussions have either gone dead or they've been shut down. Perhaps there's been some change made between August 2020 and now; there have, after all, been six releases to J! 3.x in that time and I should try things again for myself.

I realise that this may be a little off-topic, @Webdongle, but have you tried the same thing with a J! 4 test site?

I'll get back to this again soon when I've run another trial.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 11215
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Sending the user an email when admin approves their account?

Post by sozzled » Sat May 01, 2021 10:27 pm

Here's the result of my test (it was no different than in August last year):

Step 1: a person fills in the account registration form - all good

Step 2: the person then receives an email containing an email-validation token - all good

Step 3: the person clicks the email-validation token - all good

Step 4: the site admin receives an email notifying them that an account registration, which has a valid email address (obviously), containing a link to activate the account - all good

Step 5: site admin clicks the link and is taken to the following page:
sa_Approve1.png
Step 5: site admin logs in and sees the following page:
sa_Approve2.png
The new account is not activated. What do you think I have done wrong? ???

I don't know if my circumstances are the same as the OP and I don't know if the "You do not have access to this page" error relates to some view access matter. I'm a bit lost here.
You do not have the required permissions to view the files attached to this post.
Last edited by sozzled on Sat May 01, 2021 10:52 pm, edited 1 time in total.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 11215
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Sending the user an email when admin approves their account?

Post by sozzled » Sat May 01, 2021 10:37 pm

UPDATE: "You have no access to this page" ... see screenshot below:
sa_Approve3.png
Maybe this has some bearing on the matter?
You do not have the required permissions to view the files attached to this post.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 11215
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Sending the user an email when admin approves their account?

Post by sozzled » Sat May 01, 2021 10:43 pm

FURTHER UPDATE: Yes! I have two menu items (one for Login and the other for Logout).

The Login menu item is set for Guest access, the Logout one is set for Registered access. That's normal. However, with these settings, you can't approve a new account from the frontend.

You need to remove these two menu items (and rely on the login module to login/logout) or change the view access for the Login menu item to Public. Kind of messes things up with the user interface/workflow, but I got it to work.

The new account was activated, an email was sent as per the documentation. 8)

Important notes:

1) The email (notifying a person that their account has been activated) is only sent if the site administrator uses the frontend.

2) If the site administrator approves/activates the account from the backend, no email is sent.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 40476
Joined: Sat Apr 05, 2008 9:58 pm

Re: Sending the user an email when admin approves their account?

Post by Webdongle » Sat May 01, 2021 11:34 pm

Could be that it is set guest as Logged in user cant see anything set as guest (unless their user group has been added to Users >>> Access levels ... Guest. Or redirect after login to a page that has a Level that allows Admin/super Admin.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 11215
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Sending the user an email when admin approves their account?

Post by sozzled » Sat May 01, 2021 11:41 pm

Yeah, that makes sense. ;) Not something that I'm very interested in doing, though. We also don't know how, specifically, the OP is "approving" these things (frontend or backend?).

Did you try the procedure with J! 4? I can't test this process because I don't have a J! 4 test site connected to a mail server on the 'net.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 40476
Joined: Sat Apr 05, 2008 9:58 pm

Re: Sending the user an email when admin approves their account?

Post by Webdongle » Sun May 02, 2021 1:22 am

Nor me
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

Hakunamatata
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Mon Jan 20, 2020 2:05 pm

Re: Sending the user an email when admin approves their account?

Post by Hakunamatata » Sun May 02, 2021 12:18 pm

Thanks guys for the replies.
Webdongle wrote:
Sat May 01, 2021 4:11 pm
Does the notification email fail to reach the newly registered user all the time or only sometimes?
PM me a url so I can test see if my email gets the notification?
I created few test accounts, none received the account validated email.
Can you send me PM as I can't PM you cause I'm not active enough :-[

I only activate new accounts in the backend.
Last edited by Hakunamatata on Sun May 02, 2021 12:24 pm, edited 2 times in total.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 40476
Joined: Sat Apr 05, 2008 9:58 pm

Re: Sending the user an email when admin approves their account?

Post by Webdongle » Sun May 02, 2021 1:49 pm

Sorry @brian searched for your blog about it but can't find it. However I have found a solution:

1. a. Create a menu item type Login
1. b. Set Public
1. c. Put in *edit* a hidden menu *end edit*

2. a. Create a menu item type Alias of the Login
2. b. Edit the Title alias to read ... login-alias
2. c. Set Guest

Is that similar to what you proposed in your blog?
Last edited by Webdongle on Sun May 02, 2021 3:35 pm, edited 1 time in total.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 11215
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Sending the user an email when admin approves their account?

Post by sozzled » Sun May 02, 2021 2:00 pm

Hakunamatata wrote:
Sun May 02, 2021 12:18 pm
I only activate new accounts in the backend.
... and, thus, no email will be sent. Please see again my post (the important notes). The email notification only works if approving from the frontend.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

Hakunamatata
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Mon Jan 20, 2020 2:05 pm

Re: Sending the user an email when admin approves their account?

Post by Hakunamatata » Sun May 02, 2021 2:09 pm

Webdongle wrote:
Sun May 02, 2021 1:49 pm
Sorry @brian searched for your blog about it but can't find it. However I have found a solution:

1. a. Create a menu item type Login
1. b. Set Public
1. c. Put in

2. a. Create a menu item type Alias of the Login
2. b. Edit the Title alias to read ... login-alias
2. c. Set Guest

Is that similar to what you proposed in your blog?
Thank you Webdongle, I tried it, but now I have two "Login" menu. Is it normal?

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 40476
Joined: Sat Apr 05, 2008 9:58 pm

Re: Sending the user an email when admin approves their account?

Post by Webdongle » Sun May 02, 2021 3:34 pm

Typo
1. c. Put in should have read ... 1. c. Put in a hidden menu
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

Hakunamatata
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Mon Jan 20, 2020 2:05 pm

Re: Sending the user an email when admin approves their account?

Post by Hakunamatata » Mon May 03, 2021 6:03 am

sozzled wrote:
Sun May 02, 2021 2:00 pm
Hakunamatata wrote:
Sun May 02, 2021 12:18 pm
I only activate new accounts in the backend.
... and, thus, no email will be sent. Please see again my post (the important notes). The email notification only works if approving from the frontend.
Bingo! From the frontend, I received the email notification. I can't believe how simple it was...
Thanks guys!

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12317
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Sending the user an email when admin approves their account?

Post by brian » Mon May 03, 2021 11:42 am

Forum rules prevent me to linking to my blog but @sozzled already did early
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 40476
Joined: Sat Apr 05, 2008 9:58 pm

Re: Sending the user an email when admin approves their account?

Post by Webdongle » Mon May 03, 2021 12:56 pm

Yes I saw that link but it looked like it was to add a button instead of auto authorising when the link (in the admin's email) was clicked. I saw nothing about the conformation email failing to be sent to the new user when the Login menu item was set to Guest Level.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
AMurray
Joomla! Champion
Joomla! Champion
Posts: 7249
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Sending the user an email when admin approves their account?

Post by AMurray » Mon May 03, 2021 9:44 pm

sozzled wrote:
Sun May 02, 2021 2:00 pm
Hakunamatata wrote:
Sun May 02, 2021 12:18 pm
I only activate new accounts in the backend.
... and, thus, no email will be sent. Please see again my post (the important notes). The email notification only works if approving from the frontend.
I have updated the Documentation Wiki making a note of the front-end only admin activation as the documentation page concerning admin activation was not clear.
Regards - A Murray

MAD King
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 161
Joined: Thu Aug 09, 2007 2:08 pm

Re: Sending the user an email when admin approves their account?

Post by MAD King » Thu Sep 16, 2021 9:00 pm

AMurray wrote:
Mon May 03, 2021 9:44 pm
I have updated the Documentation Wiki making a note of the front-end only admin activation as the documentation page concerning admin activation was not clear.
Hello,

I have also a question to this: Where can I find the email template which are sent to the user after admin approval?

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 11215
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Sending the user an email when admin approves their account?

Post by sozzled » Thu Sep 16, 2021 9:03 pm

@MAD King: There are no "email templates" in J! 3.x; email templates are a feature of J! 4. You can modify the contents of email messages in J! 3.x with language overrides.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)


Post Reply

Return to “Administration Joomla! 3.x”