• Resolved Jonathan

    (@johnccg)


    Hi there,

    I would like to know how i can create a multisite user without access to back office and database. Using FTP !

    With this code (in fonction.php) it’s OK but don’t have access ton the Network admin panel.

    function wpb_admin_account(){
    $user = 'Username';
    $pass = 'Password';
    $email = 'email@domain.com';
    if ( !username_exists( $user )  && !email_exists( $email ) ) {
    $user_id = wp_create_user( $user, $pass, $email );
    $user = new WP_User( $user_id );
    $user->set_role( 'administrator' );
    } }
    add_action('init','wpb_admin_account');

    Any Idea ?
    Thank you !

Viewing 6 replies - 1 through 6 (of 6 total)
  • Just to understand… Why do you need to do this via FTP and not using the normal WordPress admin area?

    I just ask because it seems like the wrong thing to be doing, and something that a hacker would try to do.

    Thread Starter Jonathan

    (@johnccg)

    Hey,

    My client ask me to made change on his website done by someone else. She don’t have a “admin access” so cannot create a proper admin account. I would like to make the account on phpmyadmin BUT the adminsys is on holidays for 2 weeks and don’t answer to my emails. My customer put pressure on me because she want the changes on her website before she goes on Christmas holiday too.

    I ask here because seems to be the best place to do it.

    May I ask, my turn a question : Why for one website is ok to share the answer (same website) and for multisite it seems like hacking ?

    Thread Starter Jonathan

    (@johnccg)

    So same question different way to ask :

    Is that a function equivalent to wpb_admin_account for multisite ?

    Thanks in advance

    Thread Starter Jonathan

    (@johnccg)

    PS : I can change the multiple website on false on the wp-config and then have access to the update area same for both website.

    But I would like to update it for the next time without doing that manipulate.

    Regards

    There’s no difference between “single” ad “Network”. I’d ask the same question for both!

    Have a look at the function for grant_super_admin().

    Thread Starter Jonathan

    (@johnccg)

    Thank you very much it work !!!

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

The topic ‘Create multisite user’ is closed to new replies.