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 | 30 | // TODO: refactor the code below (and change for new db) |
| 31 | 31 | // also need to add ldap dn to user table |
| 32 | 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 | 34 | $sql->query($query); |
| 35 | - //$sql->query("select * from $default->owl_users_table where username = '$username' and password = '" . md5($password) . "'"); | |
| 36 | 35 | $numrows = $sql->num_rows($sql); |
| 37 | 36 | if ($numrows == "1") { |
| 38 | 37 | while($sql->next_record()) { |
| ... | ... | @@ -68,7 +67,6 @@ class Authenticator { |
| 68 | 67 | // authentication failed |
| 69 | 68 | $userDetails["status"] = 0; |
| 70 | 69 | } |
| 71 | - | |
| 72 | 70 | return $userDetails; |
| 73 | 71 | } |
| 74 | 72 | ... | ... |