Activate users automatically if administrator register these users
-
Hello,
I want to activate automatically users if we register this users throught the backoffice (tab Users – Add new) in order to make it faster and not to send some redundant emails.
How do you do this?
Thank you!
-
Just to aid in my thought process here, is it getting flagged as pending when you do this already? Trying to help determine if the hooks we use to set the pending status are maybe run with the manual adding or not.
Hi Michael and thank you very much for your plugin and quick answer,
When I register a user as an administrator, I receive a mail in order to active this user Besides, in BP Registration tag, the user I’ve just registered is as pending user.
I would like to have this user as active user, and I don’t receive this mail.
Thank you very much!
Can you provide the text in one of the emails you receive? As is, our plugin kind of “duplicates” emails. We send our own email as well as the email that WP/BuddyPress send out by default. We attach our user meta upon the activation process, which I think is bypassed when manually adding as an admin, but I’d need to double check. If the email being sent is not ours, and instead is the default one for a new user, then it’s not something our plugin tries to cover.
Will investigate what can be done for the pending user part. I was able to recreate, so somewhere along the line of processing, it’s getting our user meta.
https://github.com/WebDevStudios/BuddyPress-Registration-Options/issues/131
This is the first email I receive when I add a new users from Backoffice:
Subject: New Member Request
albertesga ( [email protected] ) would like to become a member of your website. To accept or reject their request, please go to http://XXXXXX/wp-admin/admin.php?page=bp_registration_options_member_requests.Then I receive another email I think it is ok with subject: New User Registration
New user registration on your site XXXXXXX:
Username: albertesga
Email: [email protected]Thank you very much Michael
First one is definitely ours. Second one I believe is BuddyPress/WordPress.
I know I have open issues about reducing redundancy, but it hasn’t been implemented at all yet. I also want to take advantage of the build in emailing functionality that BuddyPress offers now, but that may not be until version 4.4.0 of BPRO.
All in all, I think I would need to see if there’s any way I could determine the activation type, and prevent both the marking pending AND the email sending if all manual. Neither are things I have in place at the present moment.
Added these ideas to the issue I linked above, for sake of tracking thoughts.
Thank you very much for your answer.
Could you give me some tips(for example, which files or funcs…) in order to modify code in case of backoffice registration for:
– Autoactivation
– Not send emailsIf I can code something interesting I’ll share with you.
Thank you!
I don’t really have answers for that part, since I haven’t started quite yet with determining why which part of our code is being triggered with the manual adding of users and if there’s even a way to determine activation type. I know we set the initial pending status in the callback on
user_registerwhich is towards the top ofincludes/core.php.That’s the biggest thing, really. If we have a way to determine the registration type, as we’ll call it, I can work out the rest.
I’m going to leave the issue above open on github, but I am also going to bump it to a later version of the plugin, as I really want to get version 4.3.0 out the door. This is the last pending issue on that version.
The topic ‘Activate users automatically if administrator register these users’ is closed to new replies.