[owncloud-devel] user_external plugin (IMAP), set quota, add to group

Martin crysman Zahradník crysman at seznam.cz
Thu Jul 30 07:47:09 GMT 2015


Hello, please, how to make a newly created user automatically assigned
to a group (already existing group) and set him/her default quota? I am
using the user_external official plugin, customizing the imap.php file.

I am trying to figure it out myself, but no luck :/ and this seems to be
a right place to ask.

I need something like

>        if ! (userExists($uid)) {
>            addToGroup($uid, "_myfavouritegroupname_");
>            setquota($uid, "_myfavourite_quota_limit_")
>        }

But I do not know the names and parameters of real functions (if present?)


I have already found out, how to set quota, it should be like this:
>  OC_Preferences::setValue($uid, 'files', 'quota', '1024 MB');

But I am missing the "userExists()" function - in order not to make it
every time a user loggs in. It needs to be done just ONCE (first login).
And also I am missing the "addToGroup()" function :/


Thanks a lot!
Using ownCloud 8.0.x
-- 
 
/Martin crysman Zahradník/
/www:/ crysmanovo.blogspot.com <http://crysmanovo.blogspot.com>
/e-mail:/ crysman at seznam.cz
/jabber:/ crysman at jabber.org
/Google talk/hangout:/ crysmanovo at gmail.com
/facebook:/ no way!
/Skype:/ no way! using Ekiga - SIP:crysman at ekiga.net
running GNU/Linux Xubuntu
víte, jaká konzumujete vejce?
<http://crysmanovo.blogspot.cz/2015/04/o-velikonocich-vejcich-koncentracnich.html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.owncloud.org/pipermail/devel/attachments/20150730/59ffc5cc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.owncloud.org/pipermail/devel/attachments/20150730/59ffc5cc/attachment.sig>


More information about the Devel mailing list