Search Results for 'registration'
-
AuthorSearch Results
-
April 10, 2015 at 1:25 pm #237613
In reply to: Setting User Role During Custom Registration
Henry Wright
ModeratorYes, sorry I didn’t see your latest post.
Great to see you got it working! 😀
April 10, 2015 at 11:41 am #237607In reply to: Setting User Role During Custom Registration
ch1n3s3b0y
ParticipantOk, I have this working! For anyone else struggling with this, these are the steps I took:
1. I created a custom registration form ( I needed more than one form for my setup) using the tutorial from Brajesh Singh http://buddydev.com/buddypress/show-buddypress-user-registration-form-everywhere-buddypress-site/
2. I added a hidden input field to my form:
<input type="hidden" name="user_type" id="user_type" value="your_role" />
3. I added a user_meta during the registration to store the role for later use during the activation process:
function store_user_role($user_id) { $user_type = $_POST['user_type']; $user_role = $user_type; switch($user_role) { case "your_role": add_user_meta( $user_id, '_member_role', 'yourrole'); break; case "my_role": add_user_meta( $user_id, '_member_role', 'myrole'); break; default: add_user_meta( $user_id, '_member_role', 'defaultrole'); } } add_action( 'bp_core_signup_user', 'store_user_role', 20, 1);
4. Then during the activation process you check to see which user role is stored in the user_meta, and assign that as the actual WP user role:
add_action('bp_core_activated_user', 'bp_custom_registration_role',10 , 3); function bp_custom_registration_role($user_id, $key, $user) { $userdata = array(); $userdata['ID'] = $user_id; $key = '_member_role'; $single = 'true'; $userRole = get_user_meta( $user_id, $key, $single ); if ($userRole == 'yourrole') $userdata['role'] = 'yourrole'; if ($userRole == 'myrole') $userdata['role'] = 'myrole'; if (($userdata['role'] == "yourrole") or ($userdata['role'] == "myrole")) wp_update_user($userdata); }
That’s it. I used a few different examples from these support forums so credit goes out to those who got this stuff working in the first place. Hope this helps someone else.
April 10, 2015 at 10:55 am #237606In reply to: Setting User Role During Custom Registration
ch1n3s3b0y
Participant@henrywright – I wrote
$POST_['user_type']
instead of
$_POST['user_type']
D’oh! It still isn’t working though, kind of. The user is actually having the role set during the registration and is showing up in the admin section in Users as an expert, as well as pending. When I activate the account from admin they then get set as a subscriber (the default set by user roles editor). So it appears there’s another step happening after the activation of the account.
Any ideas what I need to look at?
April 10, 2015 at 9:23 am #237603Grant Derepas
ParticipantI’m thinking this might be possible using the gravity forms user registration addon and a member type field on the signup form.
Gravity Forms user registration has a hook upon user creation so we could do something like:
add_action("gform_user_registered", "add_custom_user_meta", 10, 4); function add_custom_user_meta($user_id, $config, $entry, $user_pass) { $membertype = rgar( $entry, '1' ); $set_member_type = bp_set_member_type( $user_id, $membertype ); }
The ‘1’ would be substituted for the field_id of the field where the user selects their member type (field value should be equal to the slug of the member type)
April 10, 2015 at 8:44 am #237601In reply to: Registration redirects to home page.
kaelwithme
Participantnone of those actually answered my question. note i am not logged in. this happens right after sign up, not visiting the registration page.
April 10, 2015 at 8:38 am #237599In reply to: Registration redirects to home page.
kaelwithme
Participantsite is here http://canadian-health-network.ca/
registration http://canadian-health-network.ca/register/
April 10, 2015 at 8:01 am #237598In reply to: Registration redirects to home page.
danbp
ParticipantMany topics about this where already answered on the forum.
https://buddypress.org/support/search/Registration+redirects+to+home+page/
April 8, 2015 at 1:56 pm #237483In reply to: Extraordinary amount of spammers signing up
danbp
ParticipantWide subject and several answered on this forum.
Askimet covers comment spam and doesn’t avoid clever spam bots to hit directly the DB.
Basic recommandation is to use table prefix different of the classic wp_. This calms down most bots.
A closed door is always a challenge for any spammer. WP is not fort Knox and depending your host, what YOU did and many other security details, this has no end in fact. If your site is Facebook, you’ll probably receive more spam than if it would be mykittycat homepage. Glory has a price ! 😉
Some htaccess rules against reputated spam server and one or to plugins aside what exist natively in WP should be enough to protect you a little from massive spam.
For example: buddypress honeypot + ban hammer for BP
or more simple and rought
http://mattts.net/development-stuff/web-development-stuff/wordpress/buddypress/anti-spam-techniques/registration-honeypot/… + searching this forum, maybe you can find more tips. 😉
April 7, 2015 at 11:39 pm #237428danbp
ParticipantI told about BuddyDrive because you have a download button aside a description written in french. And that plugin author is french, like me. And i’m a user of this plugin….
You use a premium theme, and we can’t help you much here if you have an issue with it. As we have no free access to it’s code.
As site admin, you can configure the registration form and add some description if you need some near a field.
Go to dashboard > users > profile fieldsIf you need some more details about BuddyPress feel free to read the Codex. And don’t hesitate to ask your theme support.
Have a nice day too.
April 7, 2015 at 11:18 pm #237425shaquana_folks
ParticipantI understand everything that you’re saying, but everything that you’re saying through here is still not resolving my issue to get the registration process to work on my site. I am not allowing just any random person to upload to my server with random documents if I am not only having them labeled as “Authors” (where they are able to edit their OWN profiles and edit their OWN posts, so on and so forth) and not as “Administrators” (where a person has control to change up EVERYTHING on the site and the server), but also for the fact that this Vipress theme was created to be compatible with BuddyPress, therefore, allowing people to be able to create a profile with, in this case, the MyLoopNetwork.
As far as with the whole newly register user, I already know to keep in mind about who I allow to become a member for I am constantly checking the back end of my site on a regular basis. All I’m trying to do is create my own version of a website where users can sign up as a new user, create their own profiles, update their posts, upload their own pictures, connect with other MyLoopNetwork users, create groups that people can join, and pretty much build up on their own news feed through their profiles without conflicting with any sections or areas of the overall site.
I don’t know anything about this BuddyDrive plugin that you have mentioned, but for the record, this is my first WordPress website that I’ve been working on for months and I’m trying to learn as much as possible. I’m just trying to get some assistance on how to resolve certain issues that came across my way with configuring this particular theme. So with you saying, “You’re talking about pdf, doc and docx, but on the register page nothing appears about what type of file they have to upload (as it is required) and for what !” that’s what I’m trying to explain to you. That’s what pops up on my end and on other people’s end that are trying to create their own MyLoopNetwork profile, so therefore, I do not have any control over that, for I wasn’t the one that created that coding for it to show up that way. And then you was saying, “‘Here you’ll be able to upload images. Try it out now!’ is a bit vague.” you will have to ask the creator of this Vipress theme and ask them why they have it set that way because, once again, I am NOT the one that created this theme, and this is how it automatically showed up on the registration page when people were trying to create their profile. So unless you’re going to actually give me a full detailed, step-by-step guide on how to resolve the issues that I’m trying to fix, I thank you for your time and patience and I hope you have a good day.
April 7, 2015 at 10:25 pm #237421quaelibet
ParticipantYay, it’s working now!
OK, so I had required entries in hosts file for localhost, however I had to add new host name for my site specifically and set up virtual host config for it to get the registration working.
Just out of curiosity: why was it necessary? I mean – why wasn’t it working with http://localhost:8080/my_wp_directory but is working just fine with http://bp_test.local:8080? I’m asking because basically I like to understand what I’m doing or what I’m doing wrong to not repeat same mistakes twice 😉April 7, 2015 at 10:13 pm #237419danbp
Participantallowing users to upload to your server some documents is a very bad idea while the registration process.
When a user register, you don’t know if he’s a human or a spam bot.
That’s why a newly register user is only pending and why he has to return an activation key before it is considered as a site member.
Or the site admin can ban him during the pending time, for some reason.
As long as you don’t be sure, a minima, of your new member, don’t allow him anything except viewing the site.You’re talking about pdf, doc and docx, but on the register page nothing appears about what type of file they have to upload (as it is required) and for what !
Here you’ll be able to upload images. Try it out now! is a bit vague. And i don’t think that BuddyDrive is intended to be on the register page.
BuddyDrive is a per member based plugin and can be used on a profile or in a group. As long as a member is pending, meaning doesn’t really exist, it cannot work.
April 7, 2015 at 8:03 pm #237409quaelibet
ParticipantQuick follow-up since I’m still struggling with this problem with registration, but done some more testing in the meantime.
I’ve installed clean WP with BuddyPress (same versions as above) on my other machine – LAMP server this time (php 5.5.9 & apache 2.4.7 running on Ubuntu 14.04). This time registration process is working properly! However on Windows machine still nothing…
Can this problem be somehow connected with the non-default port (8080) used on Windows machine? Or maybe BuddyPress requires some specific php modules enabled I’m not aware of? As I mentioned all other pages of my WordPress install are working properly on WAMP server and that’s not the first WordPress install I’m doing on that server and never had any WordPress problems before.
Anybody has any ideas how to fix this registration issue? Or how to test it additionally to figure out what’s going wrong here?April 7, 2015 at 11:58 am #237378quaelibet
ParticipantYes, I have permalinks enabled and set to Post name. All other pages and posts are loading just fine, no problems there. BuddyPress Members, Activity Streams and User Groups pages were successfully created and seem to be working just fine as well.
Just the registration page reloads with form data filled when I try to submit it and no user gets registered.I haven’t mentioned it in the previous post but I’ve also checked Apache logs to see if any errors were logged, but logs are all clean, so no help there unfortunately as well (btw I have Apache 2.4.4 and php 5.4.12 on my WAMP server install).
April 5, 2015 at 7:48 am #237299In reply to: turn off email notifictions in functions.php
5high
ParticipantBrilliant! It worked a treat, and I used the ‘user_register’ as suggested. So for anyone else looking for this solution, this is the code i used to turn some on and some off by default on new user registration:
add_action( 'user_register', 'bpdev_set_email_notifications_preference'); function bpdev_set_email_notifications_preference( $user_id ) { //I am putting some notifications to no by default and the common ones to yes to enable it. //ref. https://bp-tricks.com/snippets/changing-default-buddypress-notifications-settings and BP forum $settings_keys = array( 'notification_activity_new_mention' => 'yes', 'notification_activity_new_reply' => 'yes', 'notification_friends_friendship_request' => 'no', 'notification_friends_friendship_accepted' => 'no', 'notification_groups_invite' => 'no', 'notification_groups_group_updated' => 'no', 'notification_groups_admin_promotion' => 'no', 'notification_groups_membership_request' => 'no', 'notification_messages_new_message' => 'yes', ); foreach( $settings_keys as $setting => $preference ) { bp_update_user_meta( $user_id, $setting, $preference ); } }
and this went in my child theme functions.php file.
Hooray! Thanks so much again – it will make a big different to our users experience.
Cheers 🙂April 3, 2015 at 5:59 pm #237260techguy123
ParticipantI mean for the code above (it’s not the plugin’s code), I was hoping that someone could identify why it doesn’t load on the first try on the registration page.
April 3, 2015 at 4:37 pm #237256In reply to: turn off email notifictions in functions.php
shanebp
ModeratorI’ve used it and got the expected results.
Tested with new user and bulk changing.
Note: using the activation hook may not work depending on how registration is handled.
Changing the hook being used frombp_core_activated_user
touser_register
should cover all situations.April 3, 2015 at 12:05 am #237217techguy123
ParticipantHi, the thing is when I install the plugin, it messes up my login pages.
However, I’ve sort of managed to figure something out. The following code, when placed in bp-custom.php file, does exactly what I need it to do. Just ONE thing, is that it doesnt show the “Confirm Email” field during the first try. So when you click the “Complete signup” button, the page reloads and THEN it says confirm email field is missing. So on the second try, a user can successfully fill in all the fields and sign up. Would you know how to make this label “Confirm Field” show up when the page loads the first time? Thanks for your assistance, greatly appreciate it!! 😀
<?php function registration_add_email_confirm(){ ?> <?php do_action( 'bp_signup_email_first_errors' ); ?> <input type="text" name="signup_email_first" id="signup_email_first" value="<?php echo empty($_POST['signup_email_first'])?'':$_POST['signup_email_first']; ?>" /> <label>Confirm Email <?php _e( '(required)', 'buddypress' ); ?></label> <?php do_action( 'bp_signup_email_second_errors' ); ?> <?php } add_action('bp_signup_email_errors', 'registration_add_email_confirm',20); function registration_check_email_confirm(){ global $bp; //buddypress check error in signup_email that is the second field, so we unset that error if any and check both email fields unset($bp->signup->errors['signup_email']); //check if email address is correct and set an error message for the first field if any $account_details = bp_core_validate_user_signup( $_POST['signup_username'], $_POST['signup_email_first'] ); if ( !empty( $account_details['errors']->errors['user_email'] ) ) $bp->signup->errors['signup_email_first'] = $account_details['errors']->errors['user_email'][0]; //if first email field is not empty we check the second one if (!empty( $_POST['signup_email_first'] ) ){ //first field not empty and second field empty if(empty( $_POST['signup_email'] )) $bp->signup->errors['signup_email_second'] = 'Please make sure you enter your email twice'; //both fields not empty but differents elseif($_POST['signup_email'] != $_POST['signup_email_first'] ) $bp->signup->errors['signup_email_second'] = 'The emails you entered do not match.'; } } add_action('bp_signup_validate', 'registration_check_email_confirm'); ; ?>
April 2, 2015 at 7:25 pm #237205Jaremilus
Participantno, because i can’t edit only few of that (B group) req. fields when i logged as admin…
my registration looks like this: https://buddypress.org/support/topic/how-to-create-register-form-with-selectbox-and-hidden-fields/ (here C group)
April 2, 2015 at 6:41 pm #237203danbp
ParticipantWhat does not work in that plugin ?
There is an option: Require users to be approved or confirm e-mail address upon registration.It’s the only alternative actually on hand for what you want to do. Don’t forget that this is in addition to WP (see my previous answer). It is not part of WP actually.
April 1, 2015 at 4:03 pm #237114danbp
ParticipantThis field is fully part of WP registration process. And WP doesn’t use “email confirmation”.
But you can try Theme My Login if you absolutely want such feature.March 31, 2015 at 12:55 pm #237008In reply to: Buddypress Registration Form
Henry Wright
ModeratorYou could just provide your own template for the registration page (hence have your own custom registration form).
BuddyPress will use the following template hierarchy
/buddypress/members/index-register.php
Check out the Template Hierarchy article for more info on how templates work in BP.
March 31, 2015 at 12:28 pm #237005In reply to: Buddypress Registration Form
feyrisa
ParticipantHi @HenryWright !
Thank you for your replyDo you know if it’s possible to stop submiting after the buddypress registration form and redirect to a page which include the PMPro checkout ? I mean changing the Submit button by a second page where we choose a subscription ? And where can I change this button ?
Thank you
March 31, 2015 at 12:13 pm #237001In reply to: Buddypress Registration Form
Henry Wright
ModeratorHi @feyrisa
Is that a way to add membership checkout to my buddypress registration ?
It will be possible but there isn’t a configuration setting that’ll do it for you (unless the plugin itself has a setting that allows integration with BuddyPress).
March 30, 2015 at 11:38 am #236922In reply to: Trouble Creating new groups
ChristophK2003
ParticipantHi.
I am also using wordpress 4.1.1 and buddypress 2.2.1 and for all pages, which I need to map via the settings page I am getting a blank page: Groups, Members, Register and Activate. I am using the default theme. It is a multi-site setup, however buddypress is only used on the main site (first blog) and also only there activated.
I did only minor styling via the themes css and the header.php.WP_Debug does not show any errors as well as the Apache log is empty.
It was working fine until i updated recently the connected bbpress for forum.
Besides that I am using following plugins:
bbP private groups
bbPress
bbPress Advanced Capabilities
BP Registration Options (DEACTIVATED CURRENTLY)
BuddyPress
BuddyPress Group Email Subscription
BuddyPress Like (DEACTIVATED CURRENTLY)
BuddyPress Multilingual
HookPress (DEACTIVATED CURRENTLY)
Nginx Helper (only on staging)
Page Builder by SiteOrigin (DEACTIVATED CURRENTLY)
Paid Memberships Pro
Paid Memberships Pro – bbPress Add On
Paid Memberships Pro – Register Helper Add On
Social LoginNetwork activated:
WordPress SEO
WPML Multilingual CMS
WPML String Translation
Events ManagerMy dev environment is XAMPP on Mac and on the staging is a linode cloud server with Ubuntu on Nginx (I think). Both have the same issues.
It’s not a live site yet, just demo, therefore some of the plugins might get activated if I am back on track.Tried it now to get it run for about 15 hours:
– I also deactivated all plugins except buddypress and still did not get any of those sites working.
– Actiavated / Deactivated the plugins
– Used the repair tools
– looked into all my codes and fixed file endings such as empty space after ?> in php files
– Reassigned all sites
– Researched a lot in million of forumsAny hint, idea, glimps or full stack solution is highly appreciated.
Thanks, Chris
-
AuthorSearch Results