mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-21 00:18:43 +00:00
added base class file for sql as well as updated users to use class
--HG-- branch : rc-botanic-webdev
This commit is contained in:
parent
c66d9cf225
commit
4d3acc9cc0
2 changed files with 12 additions and 1 deletions
11
code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/sql.php
Normal file
11
code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/sql.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
class Sql{
|
||||
|
||||
public function db_query( $query, $values = array() )
|
||||
{
|
||||
echo "tst";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ public function checkUser($username)
|
|||
return "Username must be 5 or more characters.";
|
||||
} elseif (!preg_match('/^[a-z0-9\.]*$/', $username)) {
|
||||
return "Username can only contain numbers and letters.";
|
||||
} elseif (db_query("SELECT COUNT(*) FROM {users} WHERE name = :name", array(
|
||||
} elseif (sql::db_query("SELECT COUNT(*) FROM {users} WHERE name = :name", array(
|
||||
':name' => $username
|
||||
))->fetchField()) {
|
||||
return "Username " . $username . " is in use.";
|
||||
|
|
Loading…
Reference in a new issue