function authMysql($login, $pwd) { if (!$this->insideMysqlDomain()) { return; } $conn = nor_db_connect(); $res = nor_db_q('select id,password,new_password,username,full_name from accounts ' . 'where username='******'OR username='******'{$login}'"); } if ($row and $pwd and $pwd == $row[1] || $pwd == $row[2]) { $this->dbg("authMysql: login OK"); return array($row[4], $row[3], $row[0]); } }
function nor_group_by_name($name) { $conn = nor_db_connect(); $res = nor_db_q("select * from groups where groupname = " . nor_sql_quote($name), $conn); $row = nor_db_fetch_array($res, NOR_DB_ASSOC); return $row; }