From d902c27d855fa724ee3c97dd42199c73b70c66d2 Mon Sep 17 00:00:00 2001 From: Lars Kneschke Date: Sun, 4 Feb 2001 10:26:15 +0000 Subject: [PATCH] some changes for ldap support --- login.php | 2 +- phpgwapi/inc/class.accounts_ldap.inc.php | 2 +- phpgwapi/inc/class.acl.inc.php | 2 +- phpgwapi/inc/class.sessions.inc.php | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/login.php b/login.php index 2fd5927fcd..e8bc61d92b 100755 --- a/login.php +++ b/login.php @@ -181,4 +181,4 @@ $tmpl->set_var("template_set","default"); $tmpl->parse("loginout", "login_form"); $tmpl->p("loginout"); -?> \ No newline at end of file +?> diff --git a/phpgwapi/inc/class.accounts_ldap.inc.php b/phpgwapi/inc/class.accounts_ldap.inc.php index a05f6ddc5a..f57ee35dcc 100644 --- a/phpgwapi/inc/class.accounts_ldap.inc.php +++ b/phpgwapi/inc/class.accounts_ldap.inc.php @@ -124,7 +124,7 @@ { global $phpgw_info, $phpgw; - if (gettype($id) == "string") { $id = $this->username2userid($id); } + if (gettype($id) == "string") { $id = $this->name2id($id); } $groups = Array(); $group_memberships = $phpgw->acl->get_location_list_for_id("phpgw_group", 1, "u", intval($id)); if ($group_memberships) { diff --git a/phpgwapi/inc/class.acl.inc.php b/phpgwapi/inc/class.acl.inc.php index 06c88db300..6052843603 100644 --- a/phpgwapi/inc/class.acl.inc.php +++ b/phpgwapi/inc/class.acl.inc.php @@ -294,7 +294,7 @@ It should use the values in the $this->data global $phpgw, $phpgw_info; if ($account_id == False){ $account_id = $phpgw_info["user"]["account_id"]; } $sql = "select acl_location, acl_rights from phpgw_acl where acl_appname = '$app' and "; - $sql .= "acl_account = ".$account_id; + $sql .= "acl_account = '".$account_id."'"; $this->db->query($sql ,__LINE__,__FILE__); $rights = 0; if ($this->db->num_rows() == 0 ){ return False; } diff --git a/phpgwapi/inc/class.sessions.inc.php b/phpgwapi/inc/class.sessions.inc.php index 9b4443217a..15d41412ad 100644 --- a/phpgwapi/inc/class.sessions.inc.php +++ b/phpgwapi/inc/class.sessions.inc.php @@ -161,6 +161,7 @@ } $phpgw->accounts->accounts_const(); + print "hallo
"; $phpgw_info["user"]["session_ip"] = $this->getuser_ip();