Skip to content

Commit

Permalink
added alt number version for login (no starting zero)
Browse files Browse the repository at this point in the history
  • Loading branch information
nekromoff committed Sep 13, 2015
1 parent b461414 commit c8a81de
Show file tree
Hide file tree
Showing 5 changed files with 994 additions and 761 deletions.
3 changes: 2 additions & 1 deletion actions-web.php
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,9 @@ function login($number,$password)
$password=$db->conn->real_escape_string(trim($password));
$number=str_replace(" ","",$number); $number=str_replace("-","",$number); $number=str_replace("/","",$number);
if ($number[0]=="0") $number=$countrycode.substr($number,1,strlen($number));
$altnumber=$countrycode.$number;

$result=$db->query("SELECT userId FROM users WHERE number='$number' AND password=SHA2('$password',512)");
$result=$db->query("SELECT userId FROM users WHERE (number='$number' OR number='$altnumber') AND password=SHA2('$password',512)");
if ($result->num_rows==1)
{
$row=$result->fetch_assoc();
Expand Down
Binary file modified languages/de_DE/LC_MESSAGES/messages.mo
Binary file not shown.
Loading

0 comments on commit c8a81de

Please sign in to comment.