Search Results for 'wordpress'
-
Search Results
-
Having a small issue with registration redirects. No matter what changes I make, BuddyPress seems to “take over” registration on my multisite.
If I try to go to http://mysite.com/wp-login.php?action=register (the main site) it pushes me to http://mysite.com/subsite/register (the subsite where BuddyPress is defined).
I have BuddyPress (lastest version) enabled in one site of my multsite network, per option B on this page (e.g., ‘BP_ROOT_BLOG’ is defined in wp-config.php). It is not a multiblog.
Is this the expected behavior for this setup scenario? Or is it more likely that I have some “helpful” plugin taking over here? Or…did I force this somewhere in the code or settings (and forget to make a note to self)?
Thanks in advance…
Hello 😉
Ive been thinking for a while it would be nice with a plugin that makes it so when people register at my world of warcraft guild site and fill out character name and server the plugin would pull profile picture from the battle.net api. and use that on the persons profile
but having no clue what so ever with coding im wondering if this would be hard to do?
I know for a fact the api allows this as ive seen several other websites with this feature on, not wordpress obv
Anyone knows?
Hello,
I am trying to get user_ids of users that have field a certain filed in their profiles to show only them in a custom members loop.
global $wpdb;
$db_query = "SELECT user_id FROM wp_bp_xprofile_fields WHERE field_id = 2 AND value !empty";
$match_ids = $wpdb->get_var($db_query);
$get_these_members = '&per_page=20&type=newest&include=' .$match_ids;
if ( bp_has_members($get_these_members) ) :
I think there’s a syntax error, and !empty is not the correct way for this, I tried a lot of options non of the works.
To test it, I tried this line:
$db_query = "SELECT user_id FROM wp_bp_xprofile_fields WHERE field_id = 2 AND value = 45";
where 45 is the value of the filed for one of the members, but it still doesn’t show any member.I found that I need to implode the user_ids list from the forum, but it doesn’t help neither.
It returns ‘Sorry, no members were found.’
when I enable wp_debug appears this error
‘WordPress database error: [Unknown column ‘user_id’ in ‘field list’]’Could you please help me?
Thanks,
LeoTopic: Error 404
My register does not work and I have in General Settings under WordPress as active.
In BuddyPress there is no Active and Register page to configure. I reinstalled BuddyPress to no avail.Hi
I have adjusted my registration form to not display the username field. I only want users to be able to login with their email and so the username field is essentially redundant; however it is still required for WordPress/Buddypress.
I have found script to autogenerate a random string which is fine. What I am having trouble with, is how do I intercept the registration, before it actually registers the user so that I can randomly generate the username? I don’t want to insert a randomly generated username into the form and simply hide it, as a savvy user could view the source and change the value of the username field.
Also, is anyone aware of a simple way to check whether the username is available or not? I know that if I use a random string of 10 characters that it is unlikely that it will exist, but it is better to be safe rather than sorry.
Thanks
I’ve been having a problem getting the profile image and cover image to work. When I attempt to crop the image, it give me the “there was an error cropping your profile image” error and doesn’t post.
The site is hosted on a dedicated server.
I have deactivated all plugins except Buddypress and activated the 2015 theme, and it still gives the same error.
PHP version: 5.6
Buddypress version: 2.4.3
Wordpress version: 4.4.1The file I’m trying to uplaod and use is 9.7kb, titled X.png, and 300px by 375px
Any help or advice would be appreciated/
In the past – I’ve used the following code in my functions.php to resolve this issue:
/**BuddyPress**/ add_action( 'wp_enqueue_scripts', 'wpb_adding_scripts' ); remove_action( ‘bp_init’, ‘bp_core_wpsignup_redirect’ ); remove_action( ‘bp_screens’, ‘bp_core_screen_signup’ );I’ve also tried following the advice in this thread, with no luck.
https://buddypress.org/support/topic/use-standard-wordpress-registration/The only changes i’ve made since implimenting the above fix was to make updates to wordpress and my plugins. I suspect, the buddypress plugin update in particular to be the cause here but I cannot be sure. I’ve spent several hours trying to troubleshoot this and i’m about ready to pull my hair out here… Any advice / help would be greatly appreciated.
Helpful information:
- Site is a subdomain
- was using the wordpress registration page in earlier versions of (wordpress/buddypress) just fine.
- tried disabling/updating all plugins
- Tried googling the issue already – no luck
- the code in functions.php was added under the child theme, so updates would not over-write it
I have a custom registration form that tweaked the registration.php template to include a couple additional inputs. The form works as expected, being processed through the buddypress channels
bp_core_screen_signup()Then I hook into the bp_core_signup_user like so:
# Capture registration form's metadata fields add_action('bp_core_signup_user', array( $this, 'add_registration_metadata' ),10 ,1);Through my custom add_registration_metadata() method I store the $_POST meta to the user_id like so:
public function add_registration_metadata($user_id){ $type = isset($_POST['team_type']) ? $_POST['team_type'] : FALSE; if ($type){ # Make sure that the post value matches the available options if (($type == "type1") || ($type == "type2")) # Save the value as user meta add_user_meta( $user_id, 'team_type', $type); } /* Save username to metadata */ $username = isset($_POST['signup_username']) ? $_POST['signup_username'] : FALSE; /* Save first name to metadata */ $fname = isset($_POST['signup_fname']) ? $_POST['signup_fname'] : FALSE; /* Save last name to metadata */ $lname = isset($_POST['signup_lname']) ? $_POST['signup_lname'] : FALSE; /* Update WordPress Details */ $userdata = array ( 'ID' => $user_id, 'first_name' => $fname, 'last_name' => $lname, 'nickname' => $username, 'user_nicename' => DIV_Helper::slugify($username) ); wp_update_user( $userdata ); }As expected all the values are set in the usermeta table. I would think this is all that is left to do but its not and there is some confusion as to what is happening next.
So now the user attempts to activate their account through their email obviously passing the activation key. This works! BUT my metadata values are gone. For some reason BuddyPress wipes the values stored in the usermeta table. So then I try to hook into the bp_core_activate_signup like so:
add_action('bp_core_activated_user', array( $this, 'setup_registration_metadata') );This custom method attempts to re-update the user information but for some reason no combination seems to work, here’s what I have at the moment:
public function setup_registration_metadata($user){ if (! empty( $user ) ) { if ( is_array( $user ) ) { $user_id = $user['user_id']; } else { $user_id = $user; } if ( ! empty( $user_id ) ) { $usermeta = get_user_meta($user_id); // This doesn't seem to work as expected $type = $usermeta['team_type']; // But this does... $type = get_user_meta($user_id, 'team_type' TRUE); # Make sure the value matches the available options if (($type == "type1") || ($type == "type2")) # Set the member type bp_set_member_type($user_id, $type); # Setup username $username = $usermeta['username'][0]; # Setup first name $fname = $usermeta['first_name'][0]; # Setup last name $lname = $usermeta['last_name'][0]; /* Update WordPress Details */ $userdata = array ( 'ID' => $user_id, 'first_name' => $fname, 'last_name' => $lname, 'nickname' => $username, 'user_nicename' => DIV_Helper::slugify($username) ); wp_update_user( $userdata ); ... }Any clues as to how I can update the first & last names (not using some xprofile field that redundantly stores the same information), as well as any other custom fields I may add in the future. It’s seems I’m on the right track, this just is working right now.
Thank youl