Skip to content

Commit

Permalink
Merge pull request #32 from effone/verified-check
Browse files Browse the repository at this point in the history
Resolves #30 Verified data check
  • Loading branch information
effone authored Aug 23, 2019
2 parents ee93c78 + 8f89f6b commit bff2b0c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions upload/inc/languages/english/isango.lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,7 @@
$l['isango_no_service'] = "No service is available for you to connect at this moment.";
$l['isango_no_connection'] = "No connection detail is available for your account at this moment. You can add connections from below.";
$l['isango_existing_connection'] = "The authentication you are trying to connect is already registered with some other account.";
$l['isango_unverified_title'] = "Unverified User Data";
$l['isango_unverified_data'] = "Returned data from the provider is not verified. Please pass verification of your account data at provider's end and try back.";
$l['isango_invalid_data'] = "Service '{1}' failed to return acceptable {2}. Check your account settings or try different service gateway.";
$l['isango_connect_error_title'] = "Authentication Connection Error!!!";
9 changes: 9 additions & 0 deletions upload/inc/plugins/isango.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,15 @@ function isango_login($user, $gateway)
$errors = array();
$udata = isango_fetchinfo($user, $gateway);

// Check verified status, if available
if(isset($udata['vfd'])) {
if(!$udata['vfd']) {
error($lang->isango_unverified_data, $lang->isango_unverified_title);
} else {
unset($udata['vfd']);
}
}

foreach ($udata as $key => $val) {
$udata[$key] = $val = filter_var($db->escape_string($val), FILTER_SANITIZE_STRING);
if (empty($val) || ($val == "email" && !filter_var($val, FILTER_VALIDATE_EMAIL))) {
Expand Down
3 changes: 2 additions & 1 deletion upload/inc/plugins/isango/github.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ header[User-Agent] = "Isango"
[info]
id = "{$u['id']}"
name = "{$u['name']}"
email = "{$u['email']}"
email = "{$u['email']}"
vfd = "{$u['verified']}"

0 comments on commit bff2b0c

Please sign in to comment.