Skip to:
Content
Pages
Categories
Search
Top
Bottom

User Role


  • Hosam Seke
    Participant

    @hoseke

    Hey

    I’m interested to Add/Change users role to:

    Students
    Teachers
    Parents
    Principle

    How do i do this ?

    Cheers

Viewing 1 replies (of 1 total)

  • Henry Wright
    Moderator

    @henrywright

    Hi @hoseke

    Assuming you’re talking about WordPress roles and not BuddyPress member types, then you can do this:

    $user = wp_get_current_user();
    $user->set_role( 'student' );
Viewing 1 replies (of 1 total)
  • The topic ‘User Role’ is closed to new replies.
Skip to toolbar