jDownloads Support Forum

Older Versions => jDownloads 3.2 (Support ended) => General => Topic started by: kgeary on 19.02.2015 19:14:22

Title: Download triggers User Group Change
Post by: kgeary on 19.02.2015 19:14:22
Hello,
I have joomla 3.3 with jDownload 3.2.25. Nice work.
Users must be logged in to download, OK.
Users must accept License to download. OK

When someone successfully downloads a specific file, I want to automatically add them to a specific User Group (ACL) in addition to the User Group(s) of which they are currently a member.

Is that possible?

thanks,
Kathy
Title: Re: Download triggers User Group Change
Post by: ColinM on 19.02.2015 21:17:06
Hi
Adding a user to a user group is non trivial code!  There is nothing in jDownloads that can do that automatically.
I am intrigued why you should want them changed to another user group.  So could you please explain why?
Colin
Title: Re: Download triggers User Group Change
Post by: kgeary on 20.02.2015 01:06:35
Well, when someone downloads a file, it's actually an executable piece of software, they have accepted a legally binding agreement and their user group needs to reflect what they have agreed to.
There are a couple different agreements depending on the user role, musician, producer, etc.
Perhaps I'm making it too complicated. Maybe the download could just trigger some other status besides user group that will identify their "status".
Not sure, it's very new.
Title: Re: Download triggers User Group Change
Post by: Arno on 20.02.2015 14:07:18
QuoteWhen someone successfully downloads a specific file, I want to automatically add them to a specific User Group (ACL) in addition to the User Group(s) of which they are currently a member.
I think this is possible with a plugin action. jDownloads comes with an 'example' plugin where you can find a few special events.
So you can use this or write a other plugin which this event used:

public function onAfterDownloadIsSendJD ( &$userinfo, $cid )

But i have not the time to make it for you. So you must search a freelancer (or makes it self).

Required work like this:
- check whether the special file is selected for download
- if so then add this user to the second user group