Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter bastringue

    (@bastringue)

    I got it and it was rather simple finally: in the default configuration file of apache2 (/etc/apache2/sites-available/000-default.conf) it was necessary to add;
    <Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
    </Directory>
    and to reload apache2 of course…
    Alternatively, it is possible, and probably better, to create a specific configuration file for a specific virtual host (rather than modifying the default one)
    Hope that will help…

    Thread Starter bastringue

    (@bastringue)

    …precision : It is the version 2.4 of apache2 and I have the bad feeling that it comes from the configuration of this new version but I have no idea of how configure it for WP multisite…

    Thread Starter bastringue

    (@bastringue)

    Hello all ! I got it
    Pb : I wanted to use this plugin but I wanted to redirect towards a front-end page (and not the admin page for changing profile).
    Solution: The first stage is to redirect to a customized front page. The actual plugin cannot do this and the reason is the following : if you try to go to a page with a template which is not the admin template, you generate an infinite loop because the redirect is hooked on a template-change event. So if you want to go to a customized page “mypage.php”, you need associate this page to a specific template “specTemplate.php” and you need to add this in the ‘redirect’function :
    if (basename( get_page_template() ) != ‘specTemplate.php’) {
    wp_redirect(home_url(‘/mypage/’));
    exit();
    }

    The second stage consists in adding all the items of the edit profile form (in particular, the password stuff) and correctly POST these information (on submit) towards the correct admin function. This is feasible and many solution exist (I will come back to let one here or to give a link when done)

    If you have this missing part, you can leave it here…

    Thread Starter bastringue

    (@bastringue)

    I (try to) summarize for clarity :
    Reading this, i have tried the following:

    wpmu_signup_user( $new_user_login, $new_user_email, array( ‘add_to_blog’ => $blogid, ‘new_role’ => $role ) );

    This creates a user in the signups table (Ok).

    Unfortunately, the user doesn’t have a real user_id at this stage, as long as he has not confirmed his registration.

    So my problem has changed a little : The authorized user was supposed to be able to create a new user (this is OK now) and he was also supposed to “prepare” different things for this future user, namely create various entries for him in various other tables, and so, he needs to have a user_id.

    the same link given above proposes to add these 2 lines :
    $key = $wpdb->get_var( $wpdb->prepare( “SELECT activation_key FROM {$wpdb->signups} WHERE user_login = %s AND user_email = %s”, $new_user_login, $new_user_email ) );
    $ret = wpmu_activate_signup( $key );

    These lines activate the temporary registration by picking the activation key in the signup table and confirm the registration !!!
    Of course, once activated, it’s easy to get the id but I am afraid this completely messes up the confirmation process for the guessed user (?)

    Pierre

    Pierre

    Thread Starter bastringue

    (@bastringue)

    One step beyond…still not perfect but that may help :

    Reading this, i have tried the following:

    wpmu_signup_user( $new_user_login, $new_user_email, array( ‘add_to_blog’ => $blogid, ‘new_role’ => $role ) );
    $key = $wpdb->get_var( $wpdb->prepare( “SELECT activation_key FROM {$wpdb->signups} WHERE user_login = %s AND user_email = %s”, $new_user_login, $new_user_email ) );
    $ret = wpmu_activate_signup( $key );

    The last line permits to get the id back (in the $ret array)

    It’s better because I find an entry in the signups table now, but strangely, I can find another entry in the user table for this user…maybe due to the wpmu_activate_signup($key) ? I don’t know…

    Still searching…
    Pierre

Viewing 5 replies - 1 through 5 (of 5 total)