XF 2.1 Problems with promotion

Robert9

Well-known member
I still dont understand the promotion system

Imagine that we have a new field in xf_user for 1000 users.
Everything is done for this filed, we can set a value, we can use it as a criteria for a promotion.
Now we update 50% of the users and set the field {xf_user.new_field} to 1; the rest has 0.

Now we add a promotion with criteria "if value of xf_user.new_field > 0" then promote user to a new group {xyz};
then we use the cron job manually.

As a result, surprise, surprise, i have 22 users instead 500 promoted in that new group.

And i just have no idea why these 22 users are choosen and not the 500 with xf_user.new_field = 1;
it makes no sense.
 
Now i tried another funny thing:

add a new group x
add a new promotion; if user is is in group "registered"; then promote!

Surprise, surprise; from 1000 registered users i have now 37 promoted to the new group.

Next step is to setup a clean forum without any addon, add 10 new users and try the same ...
 
Ok, maybe this is the solution here?

$userFinder->where('last_activity', '>', time() - 2 * 3600)

Promotions are done only for user that was online the last two hours?


Ok, solved.
 
Top Bottom