User tests: Successful: Unsuccessful:
Pull Request for Issue #13620
Sending a notification email, after an Admin activate a user/users, on the user's list of com_users
An email is sent to the user, notifying him that it has been approved on the site
The user is activated but is not notified of this change
This change also requires that within the user edit view, a button appears that allows an administrator to activate the user from there.
For this, I added a new radio field "activation" for handle this under Accounts Details, but this field store a hash when the user It is registered in the site then this new field is not convenient.
I can create a new field under the params fields, and handle this as a param, but I not think this need be under the Basic Settings tab.
So, my doubt is, What is the best way to treat this?
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_users |
That is a good point @brianteeman . Thank you. I will work on that way.
@carlitorweb you might find the second half of this blog post (and the comments) useful https://brian.teeman.net/joomla/870-authorising-and-approving-joomla-users
Thanks for working on this
Really have good comments that blog post. Carlos found an easy and good way for this https://github.com/carcam/plg_user_sendactivationmail/blob/master/sendactivation/sendactivationmail.php .
But that comment about map this button with both actions, "activation" AND "resend email sound good too.
Labels |
Added:
?
|
Category | Administration com_users | ⇒ | Administration com_users Language & Strings |
@brianteeman what you think? (the warning: Could not start mail function, is because of a wrong config on my local)
Thank @Quy
I'm on my phone but the button says send email? And it activates and sends email?
If so then I personally would just call the button "activate"
To me that would be the expected behaviour
Yes, send email, but active at same time, because if send an email saying to the user can log in now, then that user need be activated for that.
Labels |
Added:
?
|
I still think the text on the button is a little unclear
The admin might think that they have to scroll down and click activate (like they did before) and then click on the button to send the email.
When in fact the button (correctly) does both. So I would prefer something like
"Activate and send email"
This commit performs this task through ajax. In this way, the user no need redirect to the com_users list. I will fix the drone errors
Still many CS, but most important is that the mail does not contain the strings values:
EDIT: which is normal as they are only present in frontend...
NOTE: Once the strings added, let's not forget the language used would be the language of the admin UI when the button is clicked, not always the language used by the new user who registered on frontend.
You need to add these language strings in backend.
Yes, I on it. But I was config phpcs well here for Joomla, for start coding better for the CMS
But I was config phpcs well here for Joomla, for start coding better for the CMS
Thank you again @infograf768 . I added the 2 missing string, and also, change the strings for the 2 different activations. When you want active the user for 1st time, and when you want send a reminder
Looks like the strings should be correctly grouped for Reminder and Activate in the model.
correctly grouped for Reminder and Activate
Sorry, not understand well what you suggest.
I meant using the right language constants for the mail sent:
COM_USERS_EMAIL_ACTIVATED_BY_ADMIN_ACTIVATION_SUBJECT
should go with
COM_USERS_EMAIL_NOTIFICATION_ACTIVATED_BODY
COM_USERS_EMAIL_NOTIFICATION_ACTIVATED_REMINDER_SUBJECT
with
COM_USERS_EMAIL_NOTIFICATION_ACTIVATED_REMINDER_BODY
in
+ if (!empty($wasActive))
+ {
+ // Then we wanted active the user and send a email notification
+ // Compute the user mail notification subject.
+ $emailSubject = JText::sprintf(
+ 'COM_USERS_EMAIL_ACTIVATED_BY_ADMIN_ACTIVATION_SUBJECT',
+ $table->name,
+ $config->get('sitename')
+ );
+
+ // Compute the user mail notification body.
+ $emailBody = JText::sprintf(
+ 'COM_USERS_EMAIL_NOTIFICATION_ACTIVATED_REMINDER_BODY',
+ $table->name,
+ JUri::root(),
+ $table->username
+ );
+ }
+ else
+ {
+ // Then we wanted only send again the email notification
+ $emailSubject = JText::sprintf(
+ 'COM_USERS_EMAIL_NOTIFICATION_ACTIVATED_REMINDER_SUBJECT',
+ $config->get('sitename')
+ );
+
+ // Compute the user mail notification body.
+ $emailBody = JText::sprintf(
+ 'COM_USERS_EMAIL_NOTIFICATION_ACTIVATED_BODY',
+ $table->name,
+ JUri::root(),
+ $table->username
+ );
+ }
Good catch @infograf768 . Thank you again, and sorry for no understand well before.
Category | Administration com_users Language & Strings | ⇒ | Repository Administration com_categories com_users Language & Strings Front End com_content com_search SQL Installation Postgresql MS SQL Libraries JavaScript External Library |
Category | Administration com_users Language & Strings Repository com_categories Front End com_content com_search SQL Installation Postgresql MS SQL Libraries JavaScript External Library | ⇒ | Administration com_users Language & Strings |
Sorry here, made a mistake
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-05-19 14:35:31 |
Closed_By | ⇒ | carlitorweb |
Status | Closed | ⇒ | New |
Closed_Date | 2018-05-19 14:35:31 | ⇒ | |
Closed_By | carlitorweb | ⇒ |
Status | New | ⇒ | Pending |
Some news about this?
I have tested this item
I tested this on Joomla 3.9. It seemed to work OK!
I have tested this item
I think the button text :
@twister65 Not sure if that is right. They way I see this being used is that a new users creates an account, the verifies (not actovates) his/her email. Then the admin gets notified and can use this button to activate the user. Only then a notification email is send to the new user.
So this button would only be used with users that have not already been activated.
Or will this also be used to resend this mail? Or are those actually two different functions?
I started looking at this PR after having issues with the link in the request-for-activation mail to the site manager did not work anymore without logging in to the (site (frontend). When adding this feature a site admin can - in stead of using the link in the mail - activate the user form the backend. Just by clicking on the activation icon in the user list. Or by clicking on the button.
But maybe I am missing something...
@twister65 ah, I see. We have
COM_USERS_USER_SEND_BUTTONTEXT and
COM_USERS_USER_RESEND_BUTTONTEXT
I am not quit sure in what situation you would need to resend this e-mail? Maybe the button could also just not show when already activated?
What's next?
Status | Pending | ⇒ | Ready to Commit |
RTC
Labels |
Added:
?
|
Category | Administration com_users Language & Strings | ⇒ | Administration com_users |
Category | Administration com_users | ⇒ | Administration com_users Language & Strings |
What's preventing this important improvement from being merged? @HLeithner
For my first thought it looks as a new feature for me and I don't know why it wasn't merged into 3.9 maybe it wasn't finished.
I would like to see it changed to J4. btw. there are some cs errors in the code.
Labels |
Added:
?
|
It would be really great if someone could port this to joomla 4
Status | Ready to Commit | ⇒ | Confirmed |
Removed RTC. To be rebased for J4.
Error "The file marked for modification does not exist: administrator/components/com_users/controllers/user.php" displayed on applying the patch
@ashvini77 This PR is for Joomla 3 were you testing on Joomla 4?
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-08-08 20:08:55 |
Closed_By | ⇒ | zero-24 | |
Labels |
Added:
?
Language Change
Removed: ? ? |
Dear @carlitorweb
in preperation of the upcomming release of Joomla 3.10 we have used GitHubs rename feature to rename the staging branch into 3.10-dev. Usually GitHub moves all existing PRs towards the new branch just fine, but here it didnt work. The reason seems to be that the fork of the CMS that was used as base for this PR has been deleted so GitHub does no longer have a base to rebase the PR against the new branch and we are also not able to reopen the PR. For that reason GitHub closed this PR in my name, when this issue is still valid It would require a new PR against the new 3.10-dev or 4.0-dev branch.
When this is still a feature you would like to have please create a PR against 4.1-dev so it can be tested and @bembelimen can take it into 4.1.
Is this feature still being worked on? I have I site where this 'send registration email' button could be very useful ;-)
We would also appreciate a working solution for this.
I am using this plugin now https://github.com/Spudley/plg_user_notifyactivation
Still an issue in Joomla 5.x
why not a simple button that "activates" the user and "sends the email" - something like here (ignore the extra tabs)