mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-05-24 00:24:07 +03:00
Fix some inputvalidation and functionnames
This commit is contained in:
parent
59183064da
commit
aa37139301
4 changed files with 55 additions and 38 deletions
|
@ -40,7 +40,10 @@ function logout() {
|
|||
|
||||
function try_login() {
|
||||
if (isset($_POST['username']) and isset($_POST['password'])) {
|
||||
$db = _get_db();
|
||||
if (valid_user($_POST['username']) === FALSE) {
|
||||
return FALSE;
|
||||
}
|
||||
$db = get_db();
|
||||
$userinfo = $db->querySingle("SELECT * FROM users WHERE emailaddress = '".$_POST['username']."'", 1);
|
||||
if (isset($userinfo['password']) and (crypt($_POST['password'], $userinfo['password']) == $userinfo['password'])) {
|
||||
set_logged_in($_POST['username']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue