diff --git a/inside/Users.php b/inside/Users.php index fef886c..46bffe3 100644 --- a/inside/Users.php +++ b/inside/Users.php @@ -54,6 +54,13 @@ class Users { $sql = "SELECT DISTINCT u.id FROM din_user u WHERE u.cardno = $selection"; + if(strlen($selection) == 8) + { + $sql = "SELECT DISTINCT u.id + FROM din_user u left join din_userphonenumber p on u.id = p.user_id + WHERE p.number = $selection"; + + } }else { // Add wildcards around and between words $selection = "%" . str_replace(" ", "% %", $selection) . "%"; @@ -559,4 +566,4 @@ AND udr.division_id_request = d.id"; return false; } } -?> \ No newline at end of file +?>