Lookup user´s group

Discussion about the commercial editions of eFront [THIS IS NOT A SUPPORT FORUM]

Lookup user´s group

Postby PeterParker » Wed Jan 06, 2016 10:58 am

Hi everyone,

I´m new to eFront and have just a really small question. I´m using eFront pro in it´s latest version.

If a User opens the Plugin page, I want to lookup if that user is a specific group. If that is the case a Button is displayed.
That´s it :D

I have no further requirements, therefore I don´t want the read the entire doc´s for just 4 line of code.
Could some please tell me how to do this or at least what the correct Database command is to search for a specific group. I took a first look at the doc´s, but couldn´t find something about that.
Note: The Group was created on my own via the UI, so it´s non of the standard groups.

Some help would be lovely :D

Best Regards

PeterParker
PeterParker
 
Posts: 2
Joined: Wed Jan 06, 2016 10:48 am

Re: Lookup user´s group

Postby vprountzos » Thu Jan 07, 2016 11:39 am

Hello,

You can use the following:

Code: Select all
User::getCurrentUser()->getUserGroups()


Then if your specific group belongs in the user groups you can display the button you want.

Kind regards

V. Prountzos
vprountzos
 
Posts: 589
Joined: Tue Feb 19, 2013 11:06 am

Re: Lookup user´s group

Postby PeterParker » Tue Jan 19, 2016 3:03 pm

Yeah,

that works! Thank´s for ur answer.

Peter Parker is very Grateful :lol:
PeterParker
 
Posts: 2
Joined: Wed Jan 06, 2016 10:48 am


Return to eFront [Commercial Editions]

Who is online

Users browsing this forum: No registered users and 1 guest

cron