Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Set role for new Pressbooks users launching and LTI connection #107

Merged
merged 1 commit into from
Aug 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions inc/class-tool.php
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ public function setupUser( $user, $guid ) {
try {
list( $user_id, $username ) = $this->createUser( $username, $email );
$wp_user = get_userdata( $user_id );
$wp_user->set_role( $role );
$is_new_user = true;
} catch ( \Exception $e ) {
return; // TODO: What should we do on fail?!
Expand Down