forked from extern/egroupware
Enhance exists() to not error due to empty $account_id
This commit is contained in:
parent
61463122ff
commit
15fcaf6bbb
@ -231,14 +231,15 @@
|
|||||||
if (gettype($account_id) == "string") {
|
if (gettype($account_id) == "string") {
|
||||||
$account_id = $this->name2id($account_id);
|
$account_id = $this->name2id($account_id);
|
||||||
}
|
}
|
||||||
$sql = "SELECT account_id FROM phpgw_accounts WHERE account_id=".$account_id;
|
if ($account_id) {
|
||||||
$this->db->query($sql,__LINE__,__FILE__);
|
$sql = "SELECT account_id FROM phpgw_accounts WHERE account_id=".$account_id;
|
||||||
if ($this->db->num_rows() == 1) {
|
$this->db->query($sql,__LINE__,__FILE__);
|
||||||
$insql = True;
|
if ($this->db->num_rows() == 1) {
|
||||||
} else {
|
$insql = True;
|
||||||
$insql = False;
|
} else {
|
||||||
|
$insql = False;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$ds = $phpgw->common->ldapConnect();
|
$ds = $phpgw->common->ldapConnect();
|
||||||
$sri = ldap_search($ds, $phpgw_info["server"]["ldap_context"], "uid=".$account_lid);
|
$sri = ldap_search($ds, $phpgw_info["server"]["ldap_context"], "uid=".$account_lid);
|
||||||
$allValues = ldap_get_entries($ds, $sri);
|
$allValues = ldap_get_entries($ds, $sri);
|
||||||
|
Loading…
Reference in New Issue
Block a user