I'll get that checked out on our next round of updates then, thanks for reporting!Yes, I forgot to mention - We did set up a notice that targets that criteria, made a new user with a date of birth 75 years in the past, that user doesn't see the notice. We've got several hundred members online right now, most of them older than 55. The promotion cron job ought to be adding most of them to the usergroup.
I'll get that checked out on our next round of updates then, thanks for reporting!
Much appreciated. No worries though, the add-on is staying free for everyone, we don't want to press out profit of it just because people rely on it. I'm planning to get around to update it next week.I am ready to buy this add-on when you make it paid. I would like updates to come faster. This plugin is very important to us. Make a fee if necessary. I am ready to pay. Please get faster updates.
Could u make like attachment restriction as in x attachment download in specific category/forum for x person in a day or week or something? Wpuld be nice to have it thanks.Much appreciated. No worries though, the add-on is staying free for everyone, we don't want to press out profit of it just because people rely on it. I'm planning to get around to update it next week.
If anyone wants to help out, feel free to list all criteria you feel aren't working and I'll make sure to test/debug them specifically.
That's not being tracked by XenForo unfortunately, so not a criteria I could build without implementing additional tracking, which is deliberately not done in the add-on so far.Could u make like attachment restriction as in x attachment download in specific category/forum for x person in a day or week or something? Wpuld be nice to have it thanks.
Changes:
- Fixed criteria not returning value:
- User has posted [no more than / at least] X posts in the last Y days
- User has [no more than / at least] X posts in [one / all combined / each] of the selected forums
- User has posted [no more than / at least] X posts in the last Y days in the selected nodes
- User has not been active in the last X days
- Fixed criteria not matching on exact match:
- User has no more than X bookmarks
- User has at...
Thanks for the update, though it seems like there are still issues. We have a promotion set up, and its only criteria is that the users be at least 55 years old. We activated it today after the upgrade, and users are being promoted despite being less than 55 years old.
Changes:
- Fixed broken logic checks on user min/max age criteria.
ErrorException: [E_NOTICE] Object of class DateTime could not be converted to int src/addons/ThemeHouse/UserCriteria/vendor/nesbot/carbon/src/Carbon/Traits/Timestamp.php:30
#0 src/addons/ThemeHouse/UserCriteria/vendor/nesbot/carbon/src/Carbon/Traits/Timestamp.php(30): XF::handlePhpError(8, '[E_NOTICE] Obje...', '/home/badgerand...', 30, Array)
#1 src/addons/ThemeHouse/UserCriteria/Listener/CriteriaUser.php(1417): Carbon\Carbon::createFromTimestamp(Object(DateTime))
#2 [internal function]: ThemeHouse\UserCriteria\Listener\CriteriaUser::criteriaUser('th_age', Array, Object(SV\ConversationEssentials\XF\Entity\User), false)
#3 src/XF/Extension.php(67): call_user_func_array(Array, Array)
#4 src/XF/App.php(2654): XF\Extension->fire('criteria_user', Array, NULL)
#5 src/XF/Criteria/User.php(64): XF\App->fire('criteria_user', Array)
#6 src/XF/Criteria/AbstractCriteria.php(63): XF\Criteria\User->isUnknownMatched('th_age', Array, Object(SV\ConversationEssentials\XF\Entity\User))
#7 src/XF/Repository/UserGroupPromotion.php(112): XF\Criteria\AbstractCriteria->isMatched(Object(SV\ConversationEssentials\XF\Entity\User))
#8 src/XF/Pub/App.php(236): XF\Repository\UserGroupPromotion->updatePromotionsForUser(Object(SV\ConversationEssentials\XF\Entity\User))
#9 src/XF/Pub/App.php(189): XF\Pub\App->updateUserCaches()
#10 src/XF/App.php(2180): XF\Pub\App->start(true)
#11 src/XF.php(391): XF\App->run()
#12 index.php(20): XF::runApp('XF\\Pub\\App')
#13 {main}
#0 src/addons/ThemeHouse/UserCriteria/Listener/CriteriaUser.php(1416): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home/badgerand...', 1416, Array)
#1 [internal function]: ThemeHouse\UserCriteria\Listener\CriteriaUser::criteriaUser('th_age', Array, Object(SV\ConversationEssentials\XF\Entity\User), false)
#2 src/XF/Extension.php(67): call_user_func_array(Array, Array)
#3 src/XF/App.php(2654): XF\Extension->fire('criteria_user', Array, NULL)
#4 src/XF/Criteria/User.php(64): XF\App->fire('criteria_user', Array)
#5 src/XF/Criteria/AbstractCriteria.php(63): XF\Criteria\User->isUnknownMatched('th_age', Array, Object(SV\ConversationEssentials\XF\Entity\User))
#6 src/XF/NoticeList.php(93): XF\Criteria\AbstractCriteria->isMatched(Object(SV\ConversationEssentials\XF\Entity\User))
#7 src/XF/Pub/App.php(594): XF\NoticeList->addConditionalNotice(11, 'block', 'Test. Ignore', Array)
#8 src/XF/Pub/App.php(531): XF\Pub\App->getNoticeList(Array)
#9 src/XF/App.php(1995): XF\Pub\App->renderPageHtml('
...', Array, Object(XF\Mvc\Reply\View), Object(XF\Mvc\Renderer\Html))
#10 src/XF/Mvc/Dispatcher.php(402): XF\App->renderPage('
...', Object(XF\Mvc\Reply\View), Object(XF\Mvc\Renderer\Html))
#11 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#12 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#13 src/XF.php(391): XF\App->run()
#14 index.php(20): XF::runApp('XF\\Pub\\App')
#15 {main}
if ($birthday->diffInYears() >= $user->Profile->age) {
$returnValue = true;
}
You running patch level 2? That's the conditional that has been fixed with the last release.There's definitely still something very odd going on. We have a promotion set up that ONLY promotes based on the user's age. Users should be at least 55 years old to be promoted. When the promotion is active, we get all kinds of users promoted, most of whom (If not all) are NOT over 55 years of age.
I took a peek at the code, and the conditional doesn't make a ton of sense.
PHP:if ($birthday->diffInYears() >= $user->Profile->age) { $returnValue = true; }
You're getting the birthday, then getting the diff in years from today, then comparing that diff to..the user's age. The two will always be equal though, right? So the conditional will always return true.
We use essential cookies to make this site work, and optional cookies to enhance your experience.