This repository has been archived by the owner on Jun 27, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added image as a property of User object populated from user_image parameter in launch message
- Loading branch information
Stephen Vickers
committed
Sep 18, 2016
1 parent
a65bd59
commit 4a28e44
Showing
2 changed files
with
14 additions
and
2 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 |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
* @author Stephen P Vickers <[email protected]> | ||
* @copyright IMS Global Learning Consortium Inc | ||
* @date 2016 | ||
* @version 3.0.0 | ||
* @version 3.0.2 | ||
* @license GNU Lesser General Public License, version 3 (<http://www.gnu.org/licenses/lgpl.html>) | ||
*/ | ||
class ToolProvider | ||
|
@@ -1074,6 +1074,11 @@ private function authenticate() | |
$email = (isset($_POST['lis_person_contact_email_primary'])) ? $_POST['lis_person_contact_email_primary'] : ''; | ||
$this->user->setEmail($email, $this->defaultEmail); | ||
|
||
// Set the user image URI | ||
if (isset($_POST['user_image'])) { | ||
$this->user->image = $_POST['user_image']; | ||
} | ||
|
||
// Set the user roles | ||
if (isset($_POST['roles'])) { | ||
$this->user->roles = self::parseRoles($_POST['roles']); | ||
|
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 |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
* @author Stephen P Vickers <[email protected]> | ||
* @copyright IMS Global Learning Consortium Inc | ||
* @date 2016 | ||
* @version 3.0.0 | ||
* @version 3.0.2 | ||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 | ||
*/ | ||
class User | ||
|
@@ -39,6 +39,12 @@ class User | |
* @var string $email | ||
*/ | ||
public $email = ''; | ||
/** | ||
* User's image URI. | ||
* | ||
* @var string $image | ||
*/ | ||
public $image = ''; | ||
/** | ||
* Roles for user. | ||
* | ||
|
@@ -121,6 +127,7 @@ public function initialize() | |
$this->lastname = ''; | ||
$this->fullname = ''; | ||
$this->email = ''; | ||
$this->image = ''; | ||
$this->roles = array(); | ||
$this->groups = array(); | ||
$this->ltiResultSourcedId = null; | ||
|