diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-05-13 21:37:49 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-05-13 21:37:49 +0000 |
commit | 779f4bf4e560d7f415ea51a96ed547831745a8dc (patch) | |
tree | c99f06687da016d975b3e131ff2d57a8b68da0dd /lib/class/user.class.php | |
parent | 1a6ae62569dbc5603a361a488641950cc317ac3d (diff) | |
download | ampache-779f4bf4e560d7f415ea51a96ed547831745a8dc.tar.gz ampache-779f4bf4e560d7f415ea51a96ed547831745a8dc.tar.bz2 ampache-779f4bf4e560d7f415ea51a96ed547831745a8dc.zip |
updated sql file, and the install process now works
Diffstat (limited to 'lib/class/user.class.php')
-rw-r--r-- | lib/class/user.class.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/class/user.class.php b/lib/class/user.class.php index 990a27ce..fe75d587 100644 --- a/lib/class/user.class.php +++ b/lib/class/user.class.php @@ -585,26 +585,26 @@ class User { * create * inserts a new user into ampache */ - function create($username, $fullname, $email, $password, $access) { + public static function create($username, $fullname, $email, $password, $access) { /* Lets clean up the fields... */ - $username = sql_escape($username); - $fullname = sql_escape($fullname); - $email = sql_escape($email); - $access = sql_escape($access); + $username = Dba::escape($username); + $fullname = Dba::escape($fullname); + $email = Dba::escape($email); + $access = Dba::escape($access); /* Now Insert this new user */ - $sql = "INSERT INTO user (username, fullname, email, password, access, create_date) VALUES" . + $sql = "INSERT INTO `user` (`username`, `fullname`, `email`, `password`, `access`, `create_date`) VALUES" . " ('$username','$fullname','$email',PASSWORD('$password'),'$access','" . time() ."')"; - $db_results = mysql_query($sql, dbh()); + $db_results = Dba::query($sql); if (!$db_results) { return false; } // Get the insert_id - $insert_id = mysql_insert_id(dbh()); + $insert_id = Dba::insert_id(); /* Populates any missing preferences, in this case all of them */ - $this->fix_preferences($insert_id); + self::fix_preferences($insert_id); return $insert_id; |