Hello people,

I am doing a simple routine to autenticate a PHP WebPage using the LDAP Accounts, I need to log (into a file or table) the access, therefore I would use the account ID field but I just have that the uid field is the account name (string) and it is changeable by Zimbra Administration GUI,
So if someone will change her account name the log Reports will be incomplete.

I think that I have something wrong, this is my code

Code:
<?php
$ds = ldap_connect("Server",389) or die('die :(');  //find the server
$set = ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
if ($ds) {

    $r=ldap_bind($ds, 'uid=thesign,ou=people,dc=grupotusa,dc=mx','strong') or die('error');   //make connection
     $justthese = array("givenname", "mail","uid");
     $filter = "(&(objectClass=account))";

    $sr=ldap_search($ds, "uid=thesign,ou=people,dc=grupotusa,dc=mx", "uid=thesign",$justthese); //search the user

   $info = ldap_get_entries($ds, $sr);  //get all information

   print_r($info);
And this prints:

Code:
Array
(
    [count] => 1
    [0] => Array
        (
            [mail] => Array
                (
                    [count] => 1
                    [0] => thesign@grupotusa.mx
                )

            [0] => mail
            [uid] => Array
                (
                    [count] => 1
                    [0] => thesign
                )

            [1] => uid
            [givenname] => Array
                (
                    [count] => 1
                    [0] => ivan
                )

            [2] => givenname
            [count] => 3
            [dn] => uid=thesign,ou=people,dc=grupotusa,dc=mx
        )

)

Does anyone know how to get an static numerical ID filed? or what is the advice in things like this?

Regards

7th Sign |Ivan