user_name -> username
Change-Id: I2cb601f7e0eeb36a27e9dad662f3554a0092ab18
diff --git a/ldap.php b/ldap.php
index 637c54f..8f43c23 100755
--- a/ldap.php
+++ b/ldap.php
@@ -53,20 +53,26 @@
include 'config.php';
$ldap_host = $HOST;
$ldap_port = $PORT;
- $base_dn = str_replace('{}', $user->user_name, $BASE_DN);
+ $base_dn = str_replace('{}', $user->username, $BASE_DN);
$ldaptree = explode("{},", $BASE_DN)[1];
$info["givenName"] = $user->first_name;
$info["sn"] = $user->last_name;
- $info["uid"] = $user->user_name;
+ $info["uid"] = $user->username;
#$info["homeDirectory"]="/home/";
$info["mail"] = $user->email;
$info["o"] = $user->organization;
$info["displayName"] = $user->first_name . " " . $user->last_name;
#$info["departmentNumber"]=$user->id;
- $info["cn"] = $user->user_name;
+ $info["cn"] = $user->username;
$info["userPassword"] = $user->user_hash;
+ $info["l"] = $user->city;
+ $info["street"] = $user->street;
+ $info["postalcode"] = $user->zip;
+ $info["l"] = $user->city;
+ $info["co"] = $user->country;
+
$info["objectclass"][0] = "top";
$info["objectclass"][1] = "person";
$info["objectclass"][2] = "inetOrgPerson";