• Resolved ohorses

    (@ohorses)


    Is there an easy way to make new users authors instead of subscribers.?
    I have tried the User Role Editor plugin to no avail.

Viewing 1 replies (of 1 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi, you should be able to do that by adding the code below to your theme functions.php

    
    add_action( "adverts_new_user_notification", "my_adverts_new_user_notification", 1 );
    function my_adverts_new_user_notification( $user_id ) {
        $user = new WP_User( $user_id );
        $user->set_role( 'author' );
        return $user_id;
    }
    
Viewing 1 replies (of 1 total)

The topic ‘Change default user from subscriber to author’ is closed to new replies.