Viewing 15 replies - 1 through 15 (of 34 total)
  • Michael Beckwith

    (@tw2113)

    The BenchPresser

    with the exception of bbPress at the moment (coming in a future version, it’s now a separate plugin), they should NOT have access to the *BuddyPress* sections. Any time they try, they should be getting redirected to their profile page. Once an admin approves them, they gain access to the rest of the BuddyPress sections.

    Thread Starter 75Media

    (@75media)

    Thanks Michael,

    The problem is that when they activate the account they disappear and can’t be approved or denied?

    Am I missing something?

    Jon

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Thread Starter 75Media

    (@75media)

    Yes, they stay on the Users list but they can’t be activated so there account doesn’t work.

    Jon

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Quick questions
    WordPress version:
    BP Registration Options version:
    Other plugins you may have and active:

    Just so I know the workflow you’re dealing with, lets say I’m a user visiting your website.

    I visit, click “sign up”, receive my WP account activation email, click it and get all set up. I log in to the overall system, and try to visit BP Groups. It redirects me to my profile, and I can’t do anything in the BP areas yet. If you’re on the latest version, I don’t show up in the *frontend* user list of BP component members.

    You receive a notification saying “new user: Michael”, you go to log into your admin account, visit https://www.yourdomain.com/wp-admin/admin.php?page=bp_registration_options_member_requests and see a pending listing for me, with “Approve” and “Deny buttons available to use as you check the box next to my name.

    At this point, how is it not working? “Activate” button not doing anything? It is doing something and the list is getting cleared by the user still can’t access the BP areas still?

    Fill in any holes i may have not mentioned.

    I’m having exactly the same issue as @75media

    I visit, click “sign up”, receive my WP account activation email, click it and get a message saying my account is activated, but also see the message saying that new users must be approved.

    However, I can now log in and do anything, without the admin having to approve my account. Once I am activated, I am not showing up in the BP Registrations Member Requests section.

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    becskr, even the BuddyPress specific areas like groups or activities page? Because the plugin isn’t going to disallow people from the entirety of the WordPress site, just the BuddyPress components, excluding bbPress which I still need to re-add since it was moved to its own plugin.

    Hi Michael, thanks for your help trying to sort this out.

    I finally gave up and updated to BP registration options 4.1, buddypress 1.8.1, and WP 3.6 on my dev site and I’m thinking I’ll do the same with the live site here in a minute since everything else is definitely working fine. I also have “Group Forums (Legacy)” turned on.

    This is my first time using 4.1, and while I miss the ‘join groups at registration’ aspect, I think my client will be happiest if spam registrations really are finally quarantined and unable to comment to the site-wide activity stream as before.

    At first blush… looks good. I created a test account to see what happens. Email was sent to admin, ‘new user’ clicked the link they were emailed and can access only their own profile (when trying to access a BP page). Unfortunately, as you mention above it won’t keep people from seeing the other ‘private’ but non-BP pages of the site… which is unfortunately a requirement of my site. It’s a totally private network and the client doesn’t want people seeing ‘private’ pages and downloading ‘members only’ file downloads until they have been approved.

    I realize that it’s beyond the scope of your plugin, perhaps, but can you describe what I need to do to make this happen?

    For now I will set the default user role for the site to ‘inactive’ and use another plugin or something to ensure ‘inactive’ roles can’t access the non-BP parts of the site either. I’ll tell the client they will have to manually change approved users’ roles to ‘member’ after activating through the Member requests page.

    Is it possible for me to just add a line of code to the BP-registration-options plugin somewhere so that upon admin approval, the user’s role is changed to ‘member’? Or better yet, something I can throw into functions.php so I don’t lose it with a plugin upgrade?

    Thanks for any help you can give pointing me in the right direction.

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Hi chembro303,

    thanks for the detailed reply. It puts my mind at ease a bit knowing that at least one person can report that the appropriate BP pages aren’t getting accessed.

    That said, I’m not quite sure how I’d go about with the rest. This is an old plugin from many years ago, so I wasn’t around when it was first done, but with me having updated it for the 4.1 release, I’m decently familiar with the functionality. It uses, i believe without double checking, user meta or some other column tied to users, to set a certain value for the user upon registration. Once they are approved, the value is removed and they’re granted access to the rest of the BP site. If they’re denied, then the user is simply deleted. It’s *a* way to solve it, I’m sure there are many others.

    Right now, the plugin isn’t all that extensible via hooks, and that’s something I want to rectify in the next version, as well as a number of other plugins I help with. I’m hard-pressed to recommend editing it directly, but I know that puts you in a bit of a pickle too, with no solution at the moment.

    I think at worst case, you could always make a copy of the plugin, deactivate our copy for the time being, and activate your renamed copy. Both won’t be able to be active at the same time due to function name conflicts. However, it’d allow you to do something while still being able to easily monitor when I push out a new update. Then you could review what’s changed and see if that helps at all. Also, if you do make any changes to your copy, I’d gladly accept changelogs for consideration into ours, especially if it helps get the job done or adds useful functionality.

    Thanks Michael!

    I ended up adding the following line to bp-registration-options/includes/admin.php as line 88 (after the opening ‘elseif action == Approve’ line):
    wp_update_user( array ( 'ID' => $user_id, 'role' => 'member' ) ) ;

    This is a bit of an ugly hack but super easy and did exactly what I needed. Theoretically you could add something to the admin screen like a checkbox that says ‘upon activation, set approved user role to…’ which defaults to unchecked, but can be checked and then there’s a dropdown of all the active roles on the site to choose from. That sets a variable which is then used to set the approved user to the selected role, if the check box is checked.

    For now, I’m happy with my hacked version since it’s not hard to add one line of code each time I update if necessary. ??

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Since I can’t say that’s going to be useful in all cases for all types of people who’d use the plugin, I probably wouldn’t end up adding that line as-is. However, I could easily see a do_action() that passes in the user Id to do something with.

    Hey Michael,

    Just wanted to let you know that when I updated my live site (ostensibly the same as the dev site since dev was a clone of the live site from earlier in the day…) I experienced the same issue as @becskr and the OP:

    – My test user registered and received an activation link.
    – Admin verified that they showed up on ‘member requests’ page needing approve/deny.
    – Test user clicked the activation link and then logged in.
    – Admin no longer saw them in ‘member requests’ page, despite not having approved. (oops)
    – Member was able to access all BP pages and post to activity stream (via “what’s new, username?” on profile)
    – User was never formally approved… another way I know is the test user’s role was still set to the initial role and not the ‘once approved, change to this role’ via the line I added to includes/admin.php above

    So, I deleted that test user, went back to the plugin settings, unchecked both ‘Moderate New Members’ and ‘Private Network’, saved options, then checked them both again and clicked ‘save options’ a couple of times.

    I then repeated the exact same test with a new test user and it worked exactly as it was supposed to the whole way through the process.

    One other thing I noticed was when the first test user (the one that was not properly moderated) activated their account, no “New Member Request” email was sent to the site admin. And, no “your account has been approved” email went to the test user that time either. That’s probably more a symptom of whatever the issue was than anything causal, but I thought I’d mention it. Both those emails were sent during the process for the second user, when things worked.

    So, if someone experiences an issue maybe all it takes is toggling those options a couple of times to make sure they stick?

    Yeah actually not a single buddypress email was being sent when I updated…like all the private message notifications and stuff. I *think* I did try and turn the moderation off and on again but can’t 100% confirm this.

    Michael – sorry but I only checked that I could join a group (the button was available and I could browse). It WAS buddypress components. To help you out though I have a duplicate test site so I can double check some of your questions, but as it was the live site (and the owner was panicking about spammers) I simply just had to patch it up and get it working.

    I really appreciate all your help and for getting this back up and running though, you’re doing a great job!

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    I’m going to work on this tonight and over the weekend, because this is bothering me.

    For anyone that wants to follow along with issues etc
    https://github.com/WebDevStudios/BuddyPress-Registration-Options

    Well…I have a bit of an apology to make. It was my fault the moderation wasn’t working.
    I was trying to stop the admin emails going saying there was someone to moderate in the function wds_bp_registration_options_bp_core_activate_account

    I removed the action and didn’t see that this basically stops moderation full stop instead of just the email.

    So Michael, VERY SORRY!!

    How can I stop the wp_mail action for the admin email without disabling the whole function?

Viewing 15 replies - 1 through 15 (of 34 total)
  • The topic ‘Activation causing problems’ is closed to new replies.