Commit dfcbb4ddbaec482991e0b243354a9bc32a6072fe
1 parent
a08cd8d5
fixed username variable in select
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@56 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
1 additions
and
3 deletions
lib/Authenticator.inc
| @@ -30,9 +30,8 @@ class Authenticator { | @@ -30,9 +30,8 @@ class Authenticator { | ||
| 30 | // TODO: refactor the code below (and change for new db) | 30 | // TODO: refactor the code below (and change for new db) |
| 31 | // also need to add ldap dn to user table | 31 | // also need to add ldap dn to user table |
| 32 | $sql = new Owl_DB; | 32 | $sql = new Owl_DB; |
| 33 | - $query = "select * from $default->owl_users_table where username = '$username'"; | 33 | + $query = "select * from $default->owl_users_table where username = '$userName'"; |
| 34 | $sql->query($query); | 34 | $sql->query($query); |
| 35 | - //$sql->query("select * from $default->owl_users_table where username = '$username' and password = '" . md5($password) . "'"); | ||
| 36 | $numrows = $sql->num_rows($sql); | 35 | $numrows = $sql->num_rows($sql); |
| 37 | if ($numrows == "1") { | 36 | if ($numrows == "1") { |
| 38 | while($sql->next_record()) { | 37 | while($sql->next_record()) { |
| @@ -68,7 +67,6 @@ class Authenticator { | @@ -68,7 +67,6 @@ class Authenticator { | ||
| 68 | // authentication failed | 67 | // authentication failed |
| 69 | $userDetails["status"] = 0; | 68 | $userDetails["status"] = 0; |
| 70 | } | 69 | } |
| 71 | - | ||
| 72 | return $userDetails; | 70 | return $userDetails; |
| 73 | } | 71 | } |
| 74 | 72 |