Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'wp user activate'

Viewing 25 results - 351 through 375 (of 902 total)
  • Author
    Search Results
  • #166338
    iconimagery
    Participant

    I too have this issue. But I see some members in my users list but they do not show up on the members plugin list. So no one can see that they even exist in the group. Is there a way to force activate or log in for them?

    #166256
    @mercime
    Participant

    @hungrygolf
    RE Enable Multiblog – Where did you get “bp-config.php”? You should add enable_multiblog in wp-config.php just before /* That’s all, … Happy blogging. */ as posted at https://codex.buddypress.org/developer/developer-docs/using-multisite-with-buddypress/bp_enable_multiblog/ And, you should activate BuddyPress sitewide, i.e., via Network Admin > Plugins, not in individual site.

    Do not touch the database. If you want a subsite as your primary BuddyPress site, then see section on configure the BP_ROOT_BLOG https://codex.buddypress.org/user/install-buddypress-on-a-secondary-blog/

    gentlemanhog
    Participant

    Hi,

    I did this, after some digging into the $bp object after the registration form is posted. Not tested properly in the wild yet, so you might want to double check before using this. Done via WordPress 3.5.1 and BuddyPress 1.7.2.

    
    add_filter('bp_core_signup_send_validation_email_message', 'custom_bp_change_activation_email_message');
    function custom_bp_change_activation_email_message($message) {
    	//	Get some globals
    	global $bp, $wpdb;
    
    	//	Get the slug of the activation page
    	$slug = $bp->pages->{"activate"}->slug;
    
    	//	Get username from the signup form just posted
    	$username = $bp->signup->username;
    
    	//	SQL query to get activation key for that username
    	$sql = 'select meta_value from wp_usermeta where meta_key="activation_key" and user_id in (select ID from wp_users where user_login="' . $username . '" and user_status=2)';
    
    	//	Getting the activation key from the database
    	$activation_key = $wpdb->get_var($sql);
    
    	//	Make activation URL
    	$url = sprintf("%s/%s/?key=%s", WP_HOME, $slug, $activation_key);
    
    	//	Custom message with activation key
    	$message = "Yayy! Thanks for signing up! Please confirm your account!\n\n$url";
    
    	return $message;
    }
    

    I’ve got this in a theme’s functions.php file, but not sure if that’s the right place for it. Would it be better in bp_custom.php?

    Ta,
    Alan.

    #166110
    praveshraheja
    Participant

    any one here to help me
    installed and activated plugin and in widget area it is asking to put Birthday field Name (or ID)

    from where i can get this ?

    and as said in plugin page Birthday field must have been previously created in the Buddypress profile page so i opened USERS >Profile Fields >Add New Field

    here i user date selector to create it and after that in registration page user have to put their date of birth .but from where i can get Birthday field Name (or ID) please help .Thankyou

    Henry
    Member

    If you want to display the active member count which will exclude people who have completed the registration form but not yet activated their account, then use this

    <?php echo bp_core_get_active_member_count(); ?>

    If you want everyone including people who have not yet activated then use this

    <?php 
       global $wpdb;
       $sql = "SELECT COUNT(*) FROM " . $wpdb->prefix . "users";
       $totalusers = $wpdb->get_var($sql);
       echo $totalusers;
    ?>
    #165654
    P
    Participant

    The problem is I need to modify the core files and add a plugin at the same time so a user can change the Throttling settings in his WordPress backend.

    I really tried to simple write a plugin and skip the core files modifications, but it’s just not working out. Maybe you can help out here, I will post the 3 core file functions which I modified as well as the plugin code which I wrote. If you can figure out a way for me to not modify the core files and still get Throttling to work, share your code.

    Modified files:

    1- bp-activity\bp-activity-functions.php

    function bp_activity_post_update( $args = '' ) {
    	global $bp;
    
    	$defaults = array(
    		'content' => false,
    		'user_id' => bp_loggedin_user_id()
    	);
    	$r = wp_parse_args( $args, $defaults );
    	extract( $r, EXTR_SKIP );
    
    	if ( empty( $content ) || !strlen( trim( $content ) ) )
    		return false;
    
    	if ( bp_is_user_inactive( $user_id ) )
    		return false;
    
    	<strong>$floodTest = bp_core_check_for_flood ($user_id);
    	
    	if (!$floodTest)
    		return "flood";</strong>
    
    	// Record this on the user's profile
    	$from_user_link   = bp_core_get_userlink( $user_id );
    	$activity_action  = sprintf( __( '%s posted an update', 'buddypress' ), $from_user_link );
    	$activity_content = $content;
    	$primary_link     = bp_core_get_userlink( $user_id, false, true );
    
    	// Now write the values
    	$activity_id = bp_activity_add( array(
    		'user_id'      => $user_id,
    		'action'       => apply_filters( 'bp_activity_new_update_action', $activity_action ),
    		'content'      => apply_filters( 'bp_activity_new_update_content', $activity_content ),
    		'primary_link' => apply_filters( 'bp_activity_new_update_primary_link', $primary_link ),
    		'component'    => $bp->activity->id,
    		'type'         => 'activity_update'
    	) );
    
    	$activity_content = apply_filters( 'bp_activity_latest_update_content', $content );
    
    	// Add this update to the "latest update" usermeta so it can be fetched anywhere.
    	bp_update_user_meta( bp_loggedin_user_id(), 'bp_latest_update', array( 'id' => $activity_id, 'content' => $content ) );
    
    	do_action( 'bp_activity_posted_update', $content, $user_id, $activity_id );
    
    	return $activity_id;
    }
    

    2- bp-core\bp-core-moderation.php

    function bp_core_check_for_flood( $user_id = 0 )
    {	
    	<strong>// Option disabled. No flood checks.
    	if ( !$throttle_time = bp_get_option( 'bt_activity_time' ) )
    		return false;
    	
    	// Bail if no user ID passed
    	if ( !$user_id )
    		return false;
    
    	$last_posted = get_user_meta( $user_id, '_bp_last_posted', true );
    	
    	if ( !$last_posted )
    	{		
    		$last_posted = time();
    		add_user_meta( $user_id, '_bp_last_posted', $last_posted);
    		return true;
    	}
    	else
    	{	
    		if ( ( time() < ( $last_posted + $throttle_time ) ) && !current_user_can( 'throttle' ) )
    		{
    			update_user_meta($user_id,'_bp_last_posted',time());
    			return false;
    		}
    		else
    		{
    			update_user_meta($user_id,'_bp_last_posted',time());
    			return true;
    		}
    	}</strong>
    }

    3- bp-themes\bp-default\_inc\ajax.php

    function bp_dtheme_post_update() {
    	// Bail if not a POST action
    	if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
    		return;
    
    	// Check the nonce
    	check_admin_referer( 'post_update', '_wpnonce_post_update' );
    
    	if ( ! is_user_logged_in() )
    		exit( '-1' );
    
    	if ( empty( $_POST['content'] ) )
    		exit( '-1<div id="message" class="error"><p>' . __( 'Please enter some content to post.', 'buddypress' ) . '</p></div>' );
    
    	$activity_id = 0;
    	if ( empty( $_POST['object'] ) && bp_is_active( 'activity' ) ) {
    		$activity_id = bp_activity_post_update( array( 'content' => $_POST['content'] ) );
    
    	} elseif ( $_POST['object'] == 'groups' ) {
    		if ( ! empty( $_POST['item_id'] ) && bp_is_active( 'groups' ) )
    			$activity_id = groups_post_update( array( 'content' => $_POST['content'], 'group_id' => $_POST['item_id'] ) );
    
    	} else {
    		$activity_id = apply_filters( 'bp_activity_custom_update', $_POST['object'], $_POST['item_id'], $_POST['content'] );
    	}
    
    	if ($activity_id == "flood")
    	{
    		$bt_activity_throttle_time = bp_get_option ('bt_activity_time');
    		$bt_activity_message = bp_get_option( "bt_activity_message" );
    		
    		$msg = ( $bt_activity_message ) ? $bt_activity_message : "You have to wait to post again";
    		
    		exit( '-1<div id="message" class="error"><p>' . __( $msg, 'buddypress' ) . '</p></div>' );
    	}
    
    	if ( empty( $activity_id ) )
    		exit( '-1<div id="message" class="error"><p>' . __( 'There was a problem posting your update, please try again.', 'buddypress' ) . '</p></div>' );
    
    	if ( bp_has_activities ( 'include=' . $activity_id ) ) {
    		while ( bp_activities() ) {
    			bp_the_activity();
    			locate_template( array( 'activity/entry.php' ), true );
    		}
    	}
    
    	exit;
    }

    4- The Buddypress Throttling Plugin Code

    <?php
    add_action( 'admin_menu', 'plugin_menu' );
    
    function plugin_menu() {
    	// add_options_page( $page_title, $menu_title, $capability, $menu_slug, $function);
    	add_options_page( 'Buddypress Throttling | Settings', 'Buddypress Throttling', 'manage_options', 'buddypress_throttling', 'buddypress_throttling_options' );
    }
    
    function buddypress_throttling_options() {
    
        //must check that the user has the required capability 
        if (!current_user_can('manage_options')) {
         	WP_die( __('You do not have sufficient permissions to access this page.') );
        }
    
        // variables for the field and option names 
        $hidden_field_name = 'submit_hidden';
    
        // See if the user has posted us some information
        // If they did, this hidden field will be set to 'Y'
        if( isset($_POST[ $hidden_field_name ]) && $_POST[ $hidden_field_name ] == 'Y' ) 
    	{
    		// Activity
    		$bp_activity_time_val =  ( intval($_POST["bt_activity_time"]) <= 0 ) ? 0 : $_POST ["bt_activity_time"];
    		update_option( "bt_activity_time", $bp_activity_time_val );
    		
    		$bp_activity_message_val =  ( isset($_POST["bt_activity_message"]) && $_POST["bt_activity_message"] != "" ) ? $_POST["bt_activity_message"] : "Please wait before posting again";
    		update_option( "bt_activity_message", $bp_activity_message_val );
    		?>
    		
    		<div class="updated"><p><strong><?php _e('Settings saved.', 'menu-test' ); ?></strong></p></div>
    		<?php
    	}
    	
    	// Activity read values
    	$bt_activity_time = get_option( "bt_activity_time" );
    	$bt_activity_time = (intval($bt_activity_time) <= 0) ? 0 : $bt_activity_time;
    	$bt_activity_message = get_option( "bt_activity_message" );
    	$bt_activity_message = ($bt_activity_message) ? $bt_activity_message : "Please wait before posting again";
    	
    	echo '<div class="wrap">';
    		echo "<h2>" . __( 'Buddypress Throttling Settings', 'menu-test' ) . "</h2>";
    		?>
    	
    		<form name="form1" method="post" action="">
    			<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">	
    			<div class="bt-plugin">
    				<style>
    					.bt-plugin span { display: inline-block; width: 120px; margin-left: 20px }
    					.bt-plugin textarea {width: 400px}
    				</style>
    				<h3><?php _e("On Activity Page: ", 'menu-test' ); ?></h3>
    				<p><span>Throttling Time:</span><input type="text" name="bt_activity_time" value="<?php echo $bt_activity_time; ?>" size="20"> (in seconds)</p>
    				<p><span>Message:</span><textarea name="bt_activity_message" rows="3"><?php echo $bt_activity_message; ?></textarea></p>
    			</div>
    			<p class="submit">
    			<input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />
    			</p>
    		</form>
    	</div>
    <?php
    }

    Test it out locally, just replace the specified functions in these files with the functions I wrote, add the plugin code in a php file and save it under your Plugins directory (and activate it in the backend). The Plugin code will allow you to set the number of seconds for throttling as well as the message the user will see when he’s flooding.

    Put this puzzle pieces together and you got Flooding control (for the activity page for now), which can easily be done for friend requests @bphelp).

    bp-help
    Participant

    @dice2dice
    Do you know how to go to dashboard/pages/all pages/register? At the top of that page the title says Register just change that to Sign Up. At the top right corner of that same page click screen options and click the box beside of Slug. Now scroll down below the page body and you will see a text field labelled Slug. Change that from register to sign-up and click the blue Update button. Done!

    Spam Killer is not in the WP Repo you need to download it from the github link I provided then go to dashboard/plugins/add new, and where it says Install Plugins you will see upload below that. Select upload and browse to where you saved the Spam Killer plugin on your hard drive. Click Install Now then activate it. There is no settings just activate it and forget it. If you search the HTML source after you activate the plugin you will see the hidden field the plugin created just like below:
    <div style="display: none;"><input type="text" name="are_you_a_spammer" id="rejected" /></div>

    Private Community For BP basically makes all BP related pages private and redirects the user to the page you want. Read the instructions in the readme.txt You will have to follow the same procedure listed for Spam Killer for getting, installing, and activating the plugin.

    I have tried to make these instructions as clear as possible. Make sure to read the readme.txt in the plugins because the instructions are for fairly novice users. Let me know if you need more assistance.

    #165585
    bp-help
    Participant

    You can try this in bp-custom.php or your themes functions.php:

    
    function bphelp_redirect_to_profile_on_login() {
    global $bp;
    if(!is_user_logged_in()) { 
    wp_redirect( get_option('siteurl') . '/profile' );
    }
    }
    add_filter('get_header','bphelp_redirect_to_profile_on_login',1);
    

    Let me know if it works for you!
    If you dont want to try this then use the plugin:
    https://github.com/bphelp/private_community_for_bp
    And change line 27 accordingly in private-community-for-bp.php to the page you want folks redirected too upon login before you activate the plugin.

    #165523
    @mercime
    Participant

    @thecrow72 basically, BuddyPress uses the WP email functions for its registration process. Deactivate BuddyPress, bbPress and other plugins then check your WP registration/activation emails, etc. If it’s not working, then please resolve your issue at https://wordpress.org/support/forum/how-to-and-troubleshooting

    Before activating BuddyPress, read https://codex.buddypress.org/user/before-installing/

    Good luck!

    #165331
    discdemo
    Participant

    UPDATE! Just activated “WP User Avatar”. It allowed me to save the new avatar.

    Once saved, the Save button went away on multiple screens I checked.
    I then DE-ACTIVATED and Save button came back.

    #165010
    MarximusMG
    Participant

    I’m having the exact same issue. Have completely up to date buddypress and wp installations, deactivated all plugins, then tried buddypress pending activations plugin by itself and then unconfirmed plugin by itself. No luck, still have users with blank forum roles and completely unactivated accounts.

    #164224
    bp-help
    Participant

    I don’t have to prove anything to you I am trying to assist you. I am not the one complaining because your not using the advice given. I have had many BuddyPress sites ranging from BP 1.2 through 1.7.2 and it works great. The problem is when you have a fresh install of WP and BP then every time you install and activate a new plugin then test it against your registration. I am sorry if this sounds tedious and insensitive but I do not feel sorry for users who use out of date plugins and install 30 to 40 plugins without testing against registration only to find in the thick of it all one of those plugins conflicted with the registration and then they have to back peddle to find what they would have found if they had tested each plugin as they activated it against the registration. That is not very responsible, so do your part because the Development team can only do but so much.

    #163652
    Joss Winn
    Participant

    Thanks. I see what you mean, but it’s too focused on commercial upgrades, whereas the site I managed it based at a university with students and staff as users.

    Thanks anyway. There used to be a plugin called ‘Plugin Commander’ that might also have worked, but having tested that, it doesn’t seem to work at all with the current version of WP. Also, because bbPress can only be network activated on a network install, I’m not even sure it would have been any use anyway.

    bp-help
    Participant

    @smartmwp
    By default new users are set to subscriber’s so why did you have to set it?
    Is the profile fields you want for registration placed in the base profile which shows up automatically on registration? If you added those fields to a new field group which is secondary then it only shows after the user has activated and logged in to their account and go’s to edit their profile in this secondary field you may have created.

    #163436
    danbpfr
    Participant

    Please give more details before asking for help !
    https://buddypress.org/support/topic/when-asking-for-support-2/

    BP use the standart WP process to upload pictures. The default user avatar is set in the WP settings > discussion where you can choose between different avatar services. The default avatar shipped by BP is Mystery Man.

    When a custom user avatar is uploaded by a member, the picture goes to wp-content/uploads/avatars/ into a folder named by the user ID. The original image is handled by the process to result in 2 different size, and BP rename each file to something unique with a MD5 name, and a human comprehensive name, such as c3f55cb7f3beaa22f7463132f5e0878d-bpfull.jpg and c3f55cb7f3beaa22f7463132f5e0878d-bpthumb.jpg

    Internally BP use 3 default sizes for the user avatar: 50×50(small), 150×150(full) and 450×450 (max original file size).
    These sizes can be changed. Read here how: https://buddypress.org/support/topic/avatar-sizes-in-1-7/

    Each user can modify his profile and change his avatar so many times he want. The avatar upload process contains also an avatar cropper. The default cropping size is related to the avatar define “full”. By default it’s 150×150 and the original image is fixed to 450, even if it’s bigger on the user side.

    Depending the placeholder of a profile avatar, those size are adapted to fit the template part fixed in the theme you use. On activity stream under bp-default theme, the avatar is 20×20, on members directory it’s 150×150, etc

    The signup process is conditionned by registering. As long as a new user has not activated his account, he cannot upload or modify something, or even loggin to the site. That’s why there is no option for pics at this stage.

    And yes, you can embed a profile pic into a sidebar or any other place. But this is only possible if you’re familiarized with BP and if you have some basic PHP knowledge.

    #163333
    danbpfr
    Participant

    hi @rypo73,

    wow ! That’s not a web site you have, but a plugin plant !
    39 + BP = 46 plugins, aïe aïe aïe caramba 😀
    I suspect you have a setting somewhere who exclude admins from some process. But because suspition is not knowledge, you have to over test anything.

    Revert back to a standart install first: WP + BP 1.7.1 with bp-default theme. And try to follow those advices:

    1 – never touch the original table structure untill you know what you do
    2 – deactivate all your plugins except BP and make your registering tests for each kind of user role
    3 – activate bp-default while testing
    4 – reactivate the plugins one by one and test the register process
    4a – after an hour, you will probably understand why 46 plugins are a pain 😉
    5 – make a break in the stress: drink a coffee or a beer before continuing your test
    6 – if you absolutly need the Group o’matic plugin,update it. It’s now version 1.0.4
    7 – ensure all plugins are updated before reactivate them.

    Hold on, Rome was not built in 5 mn. 😉

    jhulianni
    Participant

    Help me!

    Error: Warning: Cannot modify header information – headers already sent by (output started at /home/content/36/10763236/html/wp-content/themes/OneCommunity/forums/index.php:12) in /home/content/36/10763236/html/wp-includes/pluggable.php on line 876

    Codigo:

    function nonreg_visitor_redirect() {
    global $bp;
    if ( bp_is_activity_component() || bp_is_groups_component() /*|| bbp_is_single_forum()*/ || bp_is_forums_component() || bp_is_blogs_component() || bp_is_page( BP_MEMBERS_SLUG ) || bp_is_profile_component() ) {
    /* enter the component name to be blocked to visitors in the above line */
    if(!is_user_logged_in()) { //just a visitor and not logged in
    wp_redirect( get_option(‘siteurl’) . ‘/register’ );
    }

    Solved error?????

    #162787
    RB2108
    Participant

    Thanks Fee … that worked up to a point. I’m using WP 3.51 immediately after a fresh install and so the default theme Twenty Twelve is being used. So, after your instructions (with a small uncertainly at the end) all I see on the nav bar is Home, Activities, Members, Sample Page. Nothing about groups or forums.

    Your instructions mentioned ‘Activate group forums for BuddyPress’ which I couldn’t see on the page. What I got was

    BuddyPress Forum settings for BuddyPress
    Enable Group Forums Allow BuddyPress Groups to have their own forums
    Group Forums Parent is the parent for all group forums
    Using the Forum Root is not recommended. Changing this does not move existing forums.

    The first box was ticked by default (which I left alone) and as instructed, I set the Group Furums Root to ‘Group Forum’.

    So, why are there no Forums on the home page ?

    Apologies if I’m being stupid here. I think you BP folks have done a great job .. however, I find the available docs not very user-friendly i.e. if I click on ‘documentation’ from the BP home page, I get a list of extremely esoteric items where I would expect to see a few idiot’s guides on installation, configuration etc etc. I reckon that I’m quite knowledgeable about WordPress having created and supported 3 sites, but I’ve found bbPress and BuddyPress very confusing.

    Thanks
    Ron

    #162714
    danbpfr
    Participant

    @attention,

    check your avatar settings on WP first. By default it should be Mystery Man ( i would recommend to let this setting as is). If you activate Gravatar, your site will bind with Gravatar first. User that have no Gravatar account will then have a Mystery Man avatar instead.

    This is pureWP admin stuff.

    BP handles avatars on a member basis in a slightly different manner. Each user can change/upload his avatar from within his profile.

    You’re using Salutation, a third party theme which is IMO complicated to use with BP, because it is a bit away from the WP theme standards.

    You also use an old avatar plugin, which wasn’t updated since sept. 2011. So if you use WP 3.5.1 and BP 1.6.5 or 1.7, i doubt that this plugin will work correctly. https://wordpress.org/extend/plugins/simple-local-avatars/

    Let me suggest you this one: https://wordpress.org/extend/plugins/bp-avatar-suggestions/

    It’s not Mystery Man, it’s not Gravatar, but it handles your own avatar pictures or let your user free to choose there personnal one. And the plugin is working with Salutation and with BP 1.7 too.

     

     

     

    #162025
    John Conner
    Participant

    @mercime
    – WP single 3.5.1
    – not new install
    – BP default theme
    – updated from 1.6.4 to 1.7 and had this problem before, I thought it would be solved
    – all plugins were deactivated except BP
    – the only challenge is users can’t see users’ topics, even the creator of topic can’t see his/her post in group forum

    #162024
    John Conner
    Participant

    @mercime
    – WP single 3.5.1
    – BP default theme
    – updated from 1.6.4 to 1.7 and had this problem before, I thought it would be solved
    – all plugins were deactivated except BP
    – the only challenge is users can’t see users’ topics

    #161996
    tibmix
    Participant

    WP 2.5.1, BP 1.7, bbpress 2.2.4
    Sitewide and group forums have gone in BP 1.7 but before upgrading to 1.7, at BP installation I unchecked “Discussion forums” option.
    The problem persists if I deactivate BP plugin. I know, you’ll say now it’s not BP’s problem. And you’are right.
    I tried to find a solution on WP and bbpress forums as well, without success.

    Someone suggested to add an exception in .htaccess for admin-ajax.php, but I don’t know how to do this.
    I tried:
    `
    AuthType Basic
    AuthName “wp-admin”
    require valid-user
    AuthUserFile “/home/vssracin/.htpasswds/public_html/vssracing/wp-admin/passwd”
    Files “admin-ajax.php”>
    Satisfy any
    Order allow,deny
    Allow from all
    /Files>
    `

    but it’s not working (with correct “<". If I put these here the entire Files lines disappear).
    Any idea?
    Thank you.

    #161859
    @mercime
    Participant

    @tibmix not sure why, there are too many variables involved. WP/BP versions? If BP 1.6.5 or BP 1.7, are you using bbPress plugin for your forums – sitewide or group forums? If you deactivate BuddyPress, are your issues with bbPress forums resolved?

    shanebp
    Moderator

    It is confusing.

    Something, probably a plugin, is most likely do a $current_user check
    for example: is_user_logged_in()
    in a file loaded via a loader.php with something like:
    add_action( 'bp_loaded', 'some_function_that_loads_a_file' );

    The codex recommends using bp_loaded, but in 1.7 the notice was added.
    I’ve been using this instead:
    add_action( 'bp_init', 'some_function_that_loads_a_file', 9 );

    The notice only appears if you have, in wp-config.php, debug set to true.
    define('WP_DEBUG', true);

    Other than the notice, are you seeing anything that isn’t working probably?
    You could ignore it, at your peril, and set debug to false.
    Or you could deactivate your plugins one by one to see which one(s) is generating the notice.

    It would be helpful to get a definitive explanation from one of the core devs.

    #158655
    lradden
    Participant

    Hi i changed to twenty eleven theme and deactivated Buddypress. Then reactivated it and i do not see the installation wizard link. Instead I see this:
    You’ll need to activate a BuddyPress-compatible theme to take advantage of all of BuddyPress’s features. We’ve bundled a default theme, but you can always install some other compatible themes or update your existing WordPress theme.

    The following active BuddyPress Components do not have associated WordPress Pages: Activity StreamsDiscussion ForumsUser GroupsMembers.

Viewing 25 results - 351 through 375 (of 902 total)
Skip to toolbar