stronger type casting

This commit is contained in:
skeeter 2001-03-14 03:00:13 +00:00
parent fdd6c6e954
commit 130a36248a
2 changed files with 3 additions and 3 deletions

View File

@ -282,7 +282,7 @@
@reset($users);
while ($user = each($users))
{
if($user[0] != $owner && $phpgw->accounts->exists($user[0]) == True)
if($user[0] != $owner && $phpgw->accounts->exists(intval($user[0])) == True)
{
$str .= ' <option value="' . $user[0] . '"'.$parts[$user[0]].'>('.$phpgw->accounts->get_type($user[0]).') '.$user[1].'</option>'."\n";
}

View File

@ -219,9 +219,9 @@
if (gettype($account_id) == "string") {
$account_id = $this->name2id($account_id);
}
$sql = "SELECT account_id FROM phpgw_accounts WHERE account_id='".$account_id."'";
$sql = "SELECT account_id FROM phpgw_accounts WHERE account_id=".$account_id;
$this->db->query($sql,__LINE__,__FILE__);
if ($this->db->num_rows()) {
if ($this->db->num_rows() == 1) {
return True;
} else {
return False;