Location: PHPKode > projects > more.groupware > moregroupware/include/Auth/sql.inc.php
<?php
/* $Id: sql.inc.php,v 1.10 2004/02/17 12:57:53 k-fish Exp $ */

function authentify_user($user, $pass, $encrypted_pwd=''){
    global $conn;

    if ($encrypted_pwd == '') $encrypted_pwd = md5($pass);

    $sql = 'SELECT id FROM mgw_users WHERE username='.$conn->QMagic($user).' AND pw='.$conn->QMagic($encrypted_pwd).' AND level='.UACTIVE;
    if(!$res = $conn->Execute($sql)) exit(showSQLerror($sql, $conn->ErrorMsg(), __LINE__, __FILE__));

    return $res->NumRows();
}
?>
Return current item: more.groupware