diff --git a/calendar/edit_entry.php b/calendar/edit_entry.php index 6fc5d3744d..ca1588b259 100755 --- a/calendar/edit_entry.php +++ b/calendar/edit_entry.php @@ -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 .= ' '."\n"; } diff --git a/phpgwapi/inc/class.accounts_ldap.inc.php b/phpgwapi/inc/class.accounts_ldap.inc.php index 0415180acf..e83759526c 100644 --- a/phpgwapi/inc/class.accounts_ldap.inc.php +++ b/phpgwapi/inc/class.accounts_ldap.inc.php @@ -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;