initial copy from user_ldap