-
Notifications
You must be signed in to change notification settings - Fork 478
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
User update from resource owner details is configurable - refs BT#16734
- Loading branch information
Sébastien Ducoulombier
committed
Feb 28, 2020
1 parent
7394a58
commit 502f890
Showing
2 changed files
with
58 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
/** | ||
* Adjust user account values | ||
* | ||
* @param array $response the Resource Owner Details | ||
* @param Chamilo\UserBundle\Entity\User $user the user | ||
* with firstname, lastname, status, username and email already updated | ||
* but unsaved | ||
*/ | ||
function oauth2_update_user_from_resource_owner_details(array $response, Chamilo\UserBundle\Entity\User $user) | ||
{ | ||
$user->setStatus(STUDENT); | ||
$user->setPhone($response['data'][0]['telephone']); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters