Skip to content

Commit

Permalink
Add Code for mobile and multiple group
Browse files Browse the repository at this point in the history
  • Loading branch information
techseriadevs committed Jan 8, 2018
1 parent 161c433 commit a4335df
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.0.11-dev"
"dev-master": "1.0.12-dev"
}
},
"config": {
Expand Down
2 changes: 2 additions & 0 deletions src/Models/ExtensionGluuUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
class ExtensionGluuUser {

public $kronoscustomattribute;
public $mobile;
public $phoneNumberVerified;

public static function map($mapdata)
{
Expand Down
13 changes: 11 additions & 2 deletions src/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,23 @@ private static function fill_email($input) {
}

private static function fill_group($input) {
$group['value'] = $input['sso_group'];
$groups[] = $group;
if (is_array($input['sso_group'])) {
foreach ($input['sso_group'] as $grp) {
$group['value'] = $grp;
$groups[] = $group;
}
} else {
$group['value'] = $input['sso_group'];
$groups[] = $group;
}
return $groups;
}

private static function fill_extention($input) {
$extensionGluuUser = new \Mrpvision\Gluu\Models\ExtensionGluuUser();
$extensionGluuUser->kronoscustomattribute = $input['kronos_username'];
$extensionGluuUser->mobile = isset($input['mobile'])?$input['mobile']:'';
$extensionGluuUser->phone_number_verified = isset($input['mobile_verified'])?$input['mobile_verified']:'';
return $extensionGluuUser;
}

Expand Down

0 comments on commit a4335df

Please sign in to comment.