remove ambiguous database->get_user(...)

git-svn-id: file:///home/shish/svn/shimmie2/trunk@263 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2007-07-12 07:37:32 +00:00
parent 3e0d983102
commit c6b7c9bb83
4 changed files with 3 additions and 12 deletions

View file

@ -306,15 +306,6 @@ class Database {
// users {{{
var $SELECT_USER = "SELECT *,(unix_timestamp(now()) - unix_timestamp(joindate))/(60*60*24) AS days_old FROM users ";
public function get_user($a=false, $b=false) {
if($b == false) {
return $this->get_user_by_id($a);
}
else {
return $this->get_user_by_name_and_hash($a, $b);
}
}
public function get_user_session($name, $session) {
$row = $this->db->GetRow("{$this->SELECT_USER} WHERE name LIKE ? AND md5(concat(pass, ?)) = ?",
array($name, $_SERVER['REMOTE_ADDR'], $session));

View file

@ -70,7 +70,7 @@ class Image {
public function get_owner() {
global $database;
return $database->get_user($this->owner_id);
return $database->get_user_by_id($this->owner_id);
}
public function get_tag_array() {

View file

@ -389,7 +389,7 @@ function _get_user() {
}
if(is_null($user)) {
$user = $database->get_user($config->get_int("anon_id", 0));
$user = $database->get_user_by_id($config->get_int("anon_id", 0));
}
assert(!is_null($user));
return $user;

View file

@ -97,7 +97,7 @@ class UserPage extends Extension {
$addr = $_SERVER['REMOTE_ADDR'];
$hash = md5( strtolower($name) . $pass );
$duser = $database->get_user($name, $hash);
$duser = $database->get_user_by_name_and_hash($name, $hash);
if(!is_null($duser)) {
$user = $duser;