Skip to content

Commit

Permalink
Merge pull request #74 from websharks/feature/#498
Browse files Browse the repository at this point in the history
Bug fix. `get_user` API call to work with all numeric usernames. See: wpsharks/s2member#498
  • Loading branch information
JasWSInc committed Mar 2, 2015
2 parents 6e32d56 + 1e855f8 commit 98281ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion s2member-pro/includes/classes/remote-ops-in.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static function get_user($op = NULL)
if(!empty($op['data']['user_id']) && ($_user = new WP_User((integer)$op['data']['user_id'])) && !empty($_user->ID))
$user = $_user;

else if(!empty($op['data']['user_login']) && ($_user = new WP_User((string)$op['data']['user_login'])) && !empty($_user->ID))
else if(!empty($op['data']['user_login']) && ($_user = new WP_User(0, (string)$op['data']['user_login'])) && !empty($_user->ID))
$user = $_user;

else if(!empty($op['data']['user_email']) && ($_user = get_user_by('email', (string)$op['data']['user_email'])) && !empty($_user->ID))
Expand Down

0 comments on commit 98281ce

Please sign in to comment.