Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'activation email'

Viewing 25 results - 1,351 through 1,375 (of 1,427 total)
  • Author
    Search Results
  • #51940
    cpkid2
    Participant

    actually the log out problem is gone now. the only problem i have is that users don’t get the registration/activation email. here are the answers.

    1. Which version of WPMU are you running?2.8.4

    2. Did you install WPMU as a directory or subdomain install? directory

    3. If a directory install, is it in root or in a subdirectory? root

    4. Did you upgraded from a previous version of WPMU? If so, from which version? no

    5. Was WPMU functioning properly before installing/upgrading BuddyPress? don’t know, i installed both one right after another

    6. Which version of BuddyPress (BP) are you running? 1.0.3

    7. Did you upgraded from a previous version of BP? If so, from which version? no

    8. Do you have any plugins other than BuddyPress installed and activated?

    -ajaxed wordpress

    -akismet

    – all in one seo pack

    – contact form 7

    – events calendar

    – google xml sitemaps

    – login with ajax

    – more privacy options

    – page links to

    – register plus

    -remove buddypress admin bar

    – sociable

    -tweetmeme button

    – wordpress database backup

    -wp postratings

    9. Are you using the standard BuddyPress themes or customized themes? customized

    10. Have you modified the core files in any way? no

    11. Do you have any custom functions in bp-custom.php? no

    12. If running bbPress, which version? no

    13. Please provide a list of any errors in your server’s log files. how do i check?

    Also, I don’t know if this is relevant but hosting is through GoDaddy.

    #51454

    In reply to: Import existing user

    peterverkooijen
    Participant

    Trying to use Manoj Kumar’s Buddypress Users Import plugin. I get this error:

    Fatal error: Maximum execution time of 30 seconds exceeded in /serverpath/wp-includes/class-phpass.php on line 60

    I don’t recognize anything in that line:

    function get_random_bytes($count)
    {
    $output = '';
    if (($fh = @fopen('/dev/urandom', 'rb'))) {
    $output = fread($fh, $count);
    fclose($fh);
    }

    Can I just temporarily delete it? Would that solve the problem? Other solutions?

    I’m trying to import 600+ members, so I’m not surprised it times out.

    EDIT: 490 members were actually imported quite nicely! :-)

    EDIT2: Not as nicely as I first thought… Username and full name didn’t make it over, only email addresses. Should I have added labels to the top line?

    EDIT3: There is no fast way to delete 490 users…?

    EDIT4: Does this plugin also update firstname + username in wp_usermeta. If not, I have to add it.

    #51446
    peterverkooijen
    Participant

    This works:

    function synchro_mailinglist($user_id, $password, $meta) {
    global $bp, $wpdb;

    $email = $wpdb->get_var("SELECT user_email FROM $wpdb->users WHERE ID='$user_id'");

    $fullname = $meta[field_1];
    $space = strpos( $fullname, ' ' );

    $company = $meta[field_2];

    if ( false === $space ) {
    $firstname = $fullname;
    $lastname = '';
    } else {
    $firstname = substr( $fullname, 0, $space );
    $lastname = trim( substr( $fullname, $space, strlen($fullname) ) );
    }

    $firstname = nameize($firstname);
    $lastname = nameize($lastname);

    ...

    $wpdb->query("INSERT mailingusers SET users_id='$user_id', group_id='1', signup_date= UNIX_TIMESTAMP(), firstname= '$firstname', lastname= '$lastname', email_address = '$email' ");
    $wpdb->query("INSERT mailingcdata SET cdata_id=NULL, user_id='$user_id', cfield_id='1', value='$company'");

    }
    add_action( 'wpmu_activate_user', 'synchro_mailinglist', 10, 3);

    I used it as part of this function. This should work other mailinglist scripts as well, just change the table and field names.

    I don’t understand why $user_email didn’t work. I had to pull the user_email from the database. Is there a cleaner way?

    #51417
    peterverkooijen
    Participant

    Even this doesn’t work:

    $email = $wpdb->query("SELECT user_email FROM $wpdb->signups WHERE activation_key = %s", $key);

    And this also does not work:

    $email = $wpdb->query("SELECT user_email FROM $wpdb->users WHERE ID = %s", $user_id);

    ?? :-(

    #51411
    peterverkooijen
    Participant

    I’m now trying to add firstname, lastname and email address straight to the database tables of my mailing list. I’ve added the queries to the function I had put together here:

    function synchro_wp_usermeta($user_id, $password, $meta) {
    global $bp, $wpdb;

    ...

    $wpdb->query("INSERT mailingusers SET users_id='$user_id', group_id='1', signup_date= UNIX_TIMESTAMP(), firstname= '$firstname', lastname= '$lastname', email_address= '$user_email'");
    $wpdb->query("INSERT mailingcdata SET cdata_id=NULL, user_id='$user_id', cfield_id='1', value='$company'");

    }
    add_action( 'wpmu_activate_user', 'synchro_wp_usermeta', 10, 3);

    This mostly works, except the for the email address. $firstname, $lastname and $user_id are all correctly added to the table, but the email_address field stays empty.

    Can anyone spot the problem?

    How can I “call” the user’s email address upon ‘wpmu_activate_user’?

    Adding a $user_email argument only produces missing argument errors. I’m out of guesses…

    $current_user->user_email doesn’t work either:

    $wpdb->query("INSERT mailingusers SET users_id='$user_id', group_id='1', signup_date= UNIX_TIMESTAMP(), firstname= '$firstname', lastname= '$lastname', email_address= '$current_user->user_email'");

    #51380
    Paul Wong-Gibbs
    Keymaster

    Original posters:

    a) Yes, but please discuss this on https://buddypress.org/forums/topic/modified-mail-message-registration.

    b) Yes I believe so, but this is a WPMU question so you are best searching on the WPMU forums

    c) Yes, it’s in the theme files. You can edit these at the moment and it might be easier to do in BP 1.1/trunk.

    #51379
    Paul Wong-Gibbs
    Keymaster

    This is not only resurrecting a 4 month old thread – of which you yourself have found several duplicates – this is more a WPMU question that BP. Use https://buddypress.org/forums/topic/modified-mail-message-registration for discussion on this area, i’m closing this thread.

    #51364
    peterverkooijen
    Participant

    I meant to say, no, it’s NOT possible. Not without some serious hacking.

    #51363
    peterverkooijen
    Participant

    What is now the recommended approach for editing the activation/signup emails?

    Other threads about this:

    Modified mail message registration

    Use full name in confirmation emails

    control of new user activation email

    #51276
    peterverkooijen
    Participant

    To autogenerate a temporary username put this function in bp-custom.php:

    function randomusername() {
    $length = 10; //length of string
    $start = 65; //Where to start from on ascii table
    $end = 90; //where to end on the table

    for ($k = 0; $k < $length; $k++){
    $randomname .= strtolower(chr(round(rand($start, $end))));
    }

    return $randomname;

    }

    Make this edit to the username input field on the form (hacking core file, should become easier in version 1.1):

    <input name="user_name" type="text" id="user_name" value="'.$user_name = randomusername().'" maxlength="50" />

    Test it if you want; you’ll see a random string in the username field that will be replace by the autogenerated username based on fullname on activation.

    You can hide the username field on the signup form, without getting error messages for not giving it proper TLC, by using this CSS trick.

    That requires another core file hack, since you need to add a id like username-form-field. Again, should become easier in version 1.1.

    My registration form is now:

    Name:

    Email address:

    And that’s it! Everything works. Full name is available as first and/or last name. The URL is the full name lower case without spaces. :-)

    Only thing left to do is clean up the email messages etc. that still mention the username…

    peterverkooijen
    Participant

    How can you identify the user on wpmu_activate_user? Only by the key from the activation link? How does that work?

    Then $bp->loggedin_user->id doesn’t work on activation either, does it?

    How is Lance Willet able to use $userid on wpmu_activate_user?

    Can I somehow use that to pull up the right meta row from wp_signups and store the values in wp_usermeta with the right user_id?

    Or can I use the email address as an identifier?

    peterverkooijen
    Participant

    The ideal registration form would look like this:

    – fullname

    – email address

    Both fields would of course be mandatory. Ideally fullname would be checked for two or more parts, but xprofile_sync_wp_profile() can handle one part input and I can live with an occassional missing last name.

    I use a jQuery validation script on another form in my site, that I may also be able to use on the registration form. As far I understand it doesn’t interfere with anything on the server side.

    Username would be generated behind the scenes from fullname.

    Many other member information fields would be optional under edit profile.

    If I can figure out how to select fullname from meta in wp_signups, adapting xprofile_sync_wp_profile() shouldn’t be that difficult.

    Or are my latest attempts above still nowhere near a solution? If you see the obvious mistakes, please point them out.

    Mariusooms
    Participant

    BP1.1 will be released in September pending development speed. I’m inclined to agree with Mike Pratt. Especially if you have a deadline that close, your solution seems very elaborate even trying to use the fullname function from BP. There is no guarantee the first and last name are existing in the username, so you can’t back on that info to be in usermeta. The only way to guarantee accurate first and last name info is to have those in user registration as a mandatory field.

    Bypassing the username and using email as a login option further removes you from even having remotely any user information other than the email address.

    Sorry to sound a little discouraging, but I’m scratching my head as to how you are trying to achieve this? Perhaps a combination with the email plugin and two required fields for first and last name is your best option, imho.

    That way you do need another plugin that needs development after you release your project and stays inline with bp updates and what not.

    peterverkooijen
    Participant

    I had a good feeling about this attempt, but still nothing in wp_usermeta:

    function synchro_wp_usermeta($user_id, $password, $meta) {
    global $bp, $wpdb;

    $field_ids = $meta['xprofile_field_ids'];
    $field_ids = explode( ',', $field_ids );

    // Loop through each bit of profile data and save it to profile.
    for ( $i = 0; $i < count($field_ids); $i++ ) {
    if ( empty( $field_ids[$i] ) ) continue;

    $field_value = $meta["field_{$field_ids[$i]}"];
    }

    $fullname = $field_value['field_1'];
    $space = strpos( $fullname, ' ' );

    if ( false === $space ) {
    $firstname = $fullname;
    $lastname = '';
    } else {
    $firstname = substr( $fullname, 0, $space );
    $lastname = trim( substr( $fullname, $space, strlen($fullname) ) );
    }

    update_usermeta( $bp->loggedin_user->id, 'nickname', $fullname );
    update_usermeta( $bp->loggedin_user->id, 'first_name', $firstname );
    update_usermeta( $bp->loggedin_user->id, 'last_name', $lastname );

    $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET display_name = %s WHERE ID = %d", $fullname, $bp->loggedin_user->id ) );
    $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET user_url = %s WHERE ID = %d", bp_core_get_user_domain( $bp->loggedin_user->id ), $bp->loggedin_user->id ) );
    }
    add_action( 'wpmu_activate_user', 'synchro_wp_usermeta', 10, 3);

    This version messes up registration:

    function synchro_wp_usermeta($user_id, $password, $meta) {
    global $bp_user_signup_meta, $bp, $wpdb;

    $fields = BP_XProfile_Field::get_signup_fields();

    $field_ids = $meta['xprofile_field_ids'];
    $field_ids = explode( ',', $field_ids );

    // Loop through each bit of profile data and save it to profile.
    for ( $i = 0; $i < count($field_ids); $i++ ) {
    if ( empty( $field_ids[$i] ) ) continue;

    $field_value = $meta["field_{$field_ids[$i]}"];
    }

    $fullname = $field_value['field_1'];
    $space = strpos( $fullname, ' ' );

    if ( false === $space ) {
    $firstname = $fullname;
    $lastname = '';
    } else {
    $firstname = substr( $fullname, 0, $space );
    $lastname = trim( substr( $fullname, $space, strlen($fullname) ) );
    }

    update_usermeta( $bp->loggedin_user->id, 'nickname', $fullname );
    update_usermeta( $bp->loggedin_user->id, 'first_name', $firstname );
    update_usermeta( $bp->loggedin_user->id, 'last_name', $lastname );

    $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET display_name = %s WHERE ID = %d", $fullname, $bp->loggedin_user->id ) );
    $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET user_url = %s WHERE ID = %d", bp_core_get_user_domain( $bp->loggedin_user->id ), $bp->loggedin_user->id ) );
    }
    add_action( 'wpmu_activate_user', 'synchro_wp_usermeta', 10, 3);

    Registration goes through as normal. The user gets one email with the activation link. But the page on the link says ‘Your account has already been activated. You can now log in with the account details that were emailed to you.’ No email arrives.

    So the above code hijacks activation without doing anything (probably because $bp_user_signup_meta was added). Still nothing in wp_usermeta either.

    My problem is getting the $fullname from $meta. I don’t understand the array stuff. I’m basically just guessing.

    If there are any php coders out there that can spot any obvious mistakes or can suggest other things to try, please help me out.

    peterverkooijen
    Participant

    Thanks for the additional clues DJPaul!

    In the latest attempt I was going back to my first approach, trying to catch the input straight from the form, so that has to run on initial user registration, not on activation.

    Or is user_register not used in Buddypress at all? Is there a wpmu or bp equivalent I could try? Should I use wpmu_create_user? According to this blog post:

    the do_action for wpmu_new_user is directly at the bottom of wpmu_create_user in the wp-includes/wpmu-functions.php the wpmu_create_user gets sent the username password and email and checks if the username or email exists, if not create the new user in the database and assign a user_id to the return, also assigning capabilities and level … this happens on *all* levels of registration and is the perfect hook point to add them into the database

    the do_action do_action( ‘wpmu_new_user’, $user_id ); so you get the immediate user_id soon as it’s created which you can use in your table

    Apparantly this is like a flowchart of registration events in wpmu (wp-includes/wpmu-default-filters.php):

    add_filter ( 'wpmu_validate_user_signup', 'signup_nonce_check' );
    add_action ( 'init', 'maybe_add_existing_user_to_blog' );
    add_filter ( 'xmlrpc_methods', 'attach_wpmu_xmlrpc' );
    add_filter ( 'wp_authenticate_user', 'wordpressmu_authenticate_siteadmin', 10, 2 );
    add_action ( 'wpmu_new_user', 'newuser_notify_siteadmin' );
    add_action ( 'wpmu_activate_user', 'add_new_user_to_blog', 10, 3 );
    add_action ( 'sanitize_user', 'strtolower_usernames', 10, 3 );

    Should I focus on these wpmu action hooks instead of regular wp hook? Does bp have a list like this somewhere?

    I couldn’t figure out how to serialize that $meta data and extract the fullname from it, so I abandoned the approach hooking into wpmu_activate_user for now. Also when I put in the $user_id and $password arguments I got the error messages about missing arguments. wtf?!

    I think this bit of code grabs the input from the registration form:

    $fields = BP_XProfile_Field::get_signup_fields();

    if ( $fields ) {
    foreach ( $fields as $field ) {

    $value = $_POST['field_' . $field->id];

    fullname is the input from field_1, but I don’t know how to finish the php to get to $fullname = … . The two latest attempts above did not work.

    I have to give up for now. Deadline at my day job coming up…

    peterverkooijen
    Participant

    Thanks Paul!

    $meta[‘field_1’] definitely looks like something to try, although I still totally don’t “get” serialized PHP arrays.

    I was also wondering if I could just bp_user_fullname() at this point, before activation.

    Trying both now…

    EDIT:

    function synchro_wp_usermeta($user_id, $meta) {
    global $bp, $wpdb;

    $fullname = $meta['field_1'];
    $space = strpos( $fullname, ' ' );

    if ( false === $space ) {
    $firstname = $fullname;
    $lastname = '';
    } else {
    $firstname = substr( $fullname, 0, $space );
    $lastname = trim( substr( $fullname, $space, strlen($fullname) ) );
    }

    update_usermeta( $bp->loggedin_user->id, 'nickname', $fullname );
    update_usermeta( $bp->loggedin_user->id, 'first_name', $firstname );
    update_usermeta( $bp->loggedin_user->id, 'last_name', $lastname );

    $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET display_name = %s WHERE ID = %d", $fullname, $bp->loggedin_user->id ) );
    $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET user_url = %s WHERE ID = %d", bp_core_get_user_domain( $bp->loggedin_user->id ), $bp->loggedin_user->id ) );
    }
    add_action( 'wpmu_activate_user', 'synchro_wp_usermeta' );

    ?>

    Registration process works fine, but I with this error in the screen on activation:

    Warning: Missing argument 2 for synchro_wp_usermeta() in /serverpath/wp-content/mu-plugins/bp-custom.php on line 187

    I had taken $password out. Thought I didn’t need it. Will try again with it added back in….

    EDIT2: Adding $password only gives me a second error:

    Warning: Missing argument 2 for synchro_wp_usermeta() in /serverpath/wp-content/mu-plugins/bp-custom.php on line 187

    Warning: Missing argument 3 for synchro_wp_usermeta() in /serverpath/wp-content/mu-plugins/bp-custom.php on line 187

    Can I just take $user_id out? Is all the information I need already in that wpmu_activate_user action?

    I’ll try that next, after deleting test users. Running out of email addresses…

    #50694
    peterverkooijen
    Participant

    No, not impossible. You’ll have to write your own plugins.

    Jeff Sayre
    Participant

    Whenever a new user registers he get an email saying click this to activate.

    And when I click it it takes me to a wierd place to crop avatars

    Okay, I’m a little confused by what you are reporting:

    1. So, are you just testing a new BuddyPress installation? Why else would you be clicking on a new user’s registration.
    2. If that is the case, have you tried using two different browsers–one for each user?
    3. Have you cleared old session cookies before registering a new user?
    4. Which version of BuddyPress are you running?
    5. There should only be one confirmation email sent. It is the one with the activation link. Are you using different emails for each account? Be default, WPMU makes sure that there are no duplciate accounts.
    6. Are you using a custom themes, or the default themes?
    7. Do you have any other plugins, besides BuddyPress, installed and activated? If so, have you tried deactivating them to check if they might be causing a conflict?

    #48922
    Sandeep Ramamoorthy
    Participant

    will this deactivate the activation email process?

    #47632
    Kunal17
    Participant

    Thanks Mike,

    I have been trying to figure out how to include that in the screen that comes up after a user enters their registration details and clicks next. Would you know what I have to edit?

    Actually the problem is not only with activation emails..all emails generated by buddypress (alerts about private messages etc) seem to be going to the spam folders.

    #47599
    Jeff Sayre
    Participant

    I believe any registration whose activation link is not clicked on within 2 days (maybe 3) is automatically deleted. You can test this be trying to register two accounts using the same email address.

    Assuming the first registration’s activation email has not be acted upon, when you try to register another account right away with that same email address the signup process will inform you that the email address is already in use. However, if you wait until 48 hours have passed, it will allow you to use that email address because the previous inactivated registration has been deleted.

    Again, it might be 72 hours. Either way, any registration that is not activated does get purged from the system.

    #45873
    2957434
    Inactive

    i tried to delete the register.php to use the singup of wordpress but still no email for confirmation is sent!

    as long as i have buddypress plugin activated, no emails are sent! what should i do or didnt have to do exactly??

    im completely confused and dunno what to do! please someone help me with this issue!

    #45325
    demowire
    Participant

    has anyone found a solve for this? it’s causing me massive problems – for some reason although the activation link emails are being sent, the password email is not, so users register, forget their password and are stuck

    if they could just set their own password at signup things would be a lot easier

    #45311
    Paul Wong-Gibbs
    Keymaster

    1) wrong forum – this is nothing to do with buddypress

    2) I think you get that message if a logged in user visits wp-activate.php or follows the email reactivation link a second time.

    #45019
    Jeff Sayre
    Participant

    However if I register using an email on another one of my domains (however the emails are still hosted on google apps), I don’t get the activation email. I checked the spam folders but its not their either.

    Are you running this on localhost–your test server environment?

    Are you providing valid email addresses, or fictitious email addresses?

Viewing 25 results - 1,351 through 1,375 (of 1,427 total)
Skip to toolbar