[owncloud-devel] Openldap Owncloud 8 set user quota

Mohammed Amine Saidi med.amine.saidi7 at gmail.com
Tue Apr 19 11:40:01 GMT 2016


$ds=ldap_connect("ldap://192.168.1.17",666)or die("Could not connect to
$ldaphost");
               ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);

               $ldapname = "cn=admin,dc=powerm,dc=com";
               $ldappasswd = "enima2005";
               $r=ldap_bind($ds,$ldapname, $ldappasswd);

                if ($r)
                    {
                          echo 'Le résultat de connexion est ' . $r . '<br
/>';

                          $info["cn"] = $login;
                          $info["sn"] = $login;
                          $info['mail'] = $email;
                          $info['userPassword']=$password;
                          $info['ownCloudQuota']=$DEFAULT_QUOTA;
                          $info["objectclass"] = "inetOrgPerson";



                           $rp = @ldap_add($ds,
"cn=".$login.",dc=powerm,dc=com", $info);
                           if(!$rp)
                             {
                              throw new \Exception('User Already Exist!');

                             }
here is my php code it doesn't work even if i added the ownCloudQuota
attribute in the owncloud configuration

2016-04-19 13:10 GMT+02:00 Mohammed Amine Saidi <med.amine.saidi7 at gmail.com>
:

> here is my configuration and my php code , it is not working !
>
> 2016-04-19 12:52 GMT+02:00 Christian Rost <rost at b1-systems.de>:
>
>> Hi,
>>
>> just have a look here.
>>
>>
>> https://doc.owncloud.org/server/8.2/admin_manual/configuration_user/user_auth_ldap.html#advanced-settings
>>
>> cheers,
>>   chris
>>
>>
>> _______________________________________________
>> Devel mailing list
>> Devel at owncloud.org
>> http://mailman.owncloud.org/mailman/listinfo/devel
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.owncloud.org/pipermail/devel/attachments/20160419/07d5e148/attachment-0001.html>


More information about the Devel mailing list