         my $ldapObjArray = [ sn => $surname ,
                              cn => $username,
                              userpassword => $password,
                              uid => $username,
                              mail => $email,
                              objectClass => ["top", "person", "organizationalperson", "inetorgperson"],
                              departmentnumber => $organizationname,
                              displayname => $where 
			     ];
    }
   &add_ldap_array($dn,$ldapObjArray);
}
sub add_ldap_array
{
    my ($dn,$ldapArrayObj) = @_;
    $conn = $ldapObj->add ( $dn, attrs => [ @$ldapArrayObj ]);
    if ( $err = $conn->code ) { $status_con=1; }
    &ldap_logerr("add usr"); 
    return $status_con;
