My next add-on needs all users from a usergroup.
To learn how to do that, i can start with the docs:
xenforo.com
Here i could learn about:
$finder = \XF::finder('XF:User');
$users = $finder->where([
'user_state' => 'valid',
* and member of usergroup 21 *
])
->fetch();
but now i miss the important part. My next step is to feed ultraedit with
Another way that helps sometimes is to look for an add-on that makes something equal. And for many cases this is a good start to find out. AndyB for example has a lot of short add-ons to understand some ways of XF2, but also he has a lot of old code with using normal PHP instead of XF-functions.
Maybe someone has other ways to find out more about coding in XF?
For my example from above i go now and search for the right add-on or try to watch the 593 places on my harddisc.
Both needs normally more or less a lot of time.
To learn how to do that, i can start with the docs:
Entities, finders and repositories | XenForo
There are a number of ways to interact with data within XF2. In XF1 this was mostly geared towards writing out raw SQL statements inside Model files. The approach in XF2 has moved away from this, and we have added a number of new ways in its place. We'll first look at the preferred method for...
Here i could learn about:
$finder = \XF::finder('XF:User');
$users = $finder->where([
'user_state' => 'valid',
* and member of usergroup 21 *
])
->fetch();
but now i miss the important part. My next step is to feed ultraedit with
$finder = \XF::finder('XF:User'); and then i search for the right lines to know more about how to fetch all users from a special usergroup. With the search query above, i will find nothing, so i will try shorter code. With ('XF:User i found 593 places, many stuff to go on.Another way that helps sometimes is to look for an add-on that makes something equal. And for many cases this is a good start to find out. AndyB for example has a lot of short add-ons to understand some ways of XF2, but also he has a lot of old code with using normal PHP instead of XF-functions.
Maybe someone has other ways to find out more about coding in XF?
For my example from above i go now and search for the right add-on or try to watch the 593 places on my harddisc.
Both needs normally more or less a lot of time.