should solve problems for the accounts->exists()

This commit is contained in:
skeeter 2001-03-18 18:09:46 +00:00
parent ec649569a4
commit e52c72c4eb

View File

@ -181,11 +181,15 @@
function exists($account_lid) function exists($account_lid)
{ {
$this->db->query("SELECT count(*) FROM phpgw_accounts WHERE account_lid='" . $account_lid if(gettype($account_lid) == 'integer')
. "'",__LINE__,__FILE__); {
$this->db->next_record(); $account_id = $account_lid;
settype($acount_lid,'string');
$account_lid = $this->id2name($account_id);
}
return $this->db->f(0); $this->db->query("SELECT count(*) FROM phpgw_accounts WHERE account_lid='".$account_lid."'",__LINE__,__FILE__);
return $this->db->num_rows() > 0;
} }
function create($account_type, $account_lid, $account_pwd, $account_firstname, $account_lastname, $account_status) function create($account_type, $account_lid, $account_pwd, $account_firstname, $account_lastname, $account_status)