1
0
Fork 0
mirror of synced 2024-06-29 03:30:34 +12:00

feat: added function to parse user object

This commit is contained in:
Christy Jacob 2020-12-26 16:47:33 +05:30
parent 46114a5920
commit d78e956612

View file

@ -39,15 +39,16 @@ class V06 extends Filter {
private function parseUser(array $content){
$parsedContent = [];
$parsedContent['$id'] = $content['$id'];
$parsedContent['registration'] = $content['registration'];
$parsedContent['name'] = $content['name'];
$parsedContent['email'] = $content['email'];
$parsedContent['$id'] = $content['$id'] ?? '';
$parsedContent['registration'] = $content['registration'] ?? '';
$parsedContent['name'] = $content['name'] ?? '';
$parsedContent['email'] = $content['email'] ?? '';
foreach (Config::getParam('providers') as $key => $provider) {
if (!$provider['enabled']) {
continue;
}
$parsedContent['oauth2'.ucfirst($key)] = '';
$parsedContent['oauth2'.ucfirst($key).'AccessToken'] = '';
}