Easy User Ban 2 by Siropu

Easy User Ban 2 by Siropu [Paid] 2.1.2

No permission to buy (€19.99)
Siropu updated Easy User Ban 2 by Siropu with a new update entry:

New Features & Improvements

Added forum and thread bans where you can ban users from certain forums and threads, temporary or permanently. These options can be enabled from and options individually.

Added board, forum and thread ban list links in "Forums" navigation.
Added thread user ban list in thread view, in options menu.
Added forum user ban list in forum view, in button group.
Added admin option to hide post content of banned users (board bans).
Added admin option to add temporary banned users to a custom user...

Read the rest of this update entry...
 
@Siropu Getting Server error log. Does this from Forum Ban/Thread Ban or @mazzly addon?

Code:
ErrorException: Template error: [E_USER_WARNING] Cannot call method isForumIdBanned on a non-object (NULL) src/XF/Template/Templater.php:1176

Generated by: arn43 Jun 15, 2022 at 9:28 PM

Stack trace

#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/nadda/pub...', 1176)
#1 src/XF/Template/Templater.php(1176): trigger_error('Cannot call met...', 512)
#2 internal_data/code_cache/templates/l1/s6/public/siropu_easy_user_ban_macros.php(142): XF\Template\Templater->method(NULL, 'isForumIdBanned', Array)
#3 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, NULL)
#4 src/addons/MaZ/AMP/XF/Template/Templater.php(139): XF\Template\Templater->callMacro('siropu_easy_use...', 'action_link', Array, Array, Object(XF\Template\MacroState))
#5 internal_data/code_cache/templates/l1/s6/public/post_macros.php(1081): MaZ\AMP\XF\Template\Templater->callMacro('siropu_easy_use...', 'action_link', Array, Array)
#6 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, NULL)
#7 src/addons/MaZ/AMP/XF/Template/Templater.php(139): XF\Template\Templater->callMacro('post_macros', 'post_action_bar', Array, Array, Object(XF\Template\MacroState))
#8 internal_data/code_cache/templates/l1/s6/public/post_macros.php(584): MaZ\AMP\XF\Template\Templater->callMacro(NULL, 'post_action_bar', Array, Array)
#9 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, NULL)
#10 src/addons/MaZ/AMP/XF/Template/Templater.php(139): XF\Template\Templater->callMacro('post_macros', 'post_footer', Array, Array, Object(XF\Template\MacroState))
#11 internal_data/code_cache/templates/l1/s6/public/post_macros.php(115): MaZ\AMP\XF\Template\Templater->callMacro(NULL, 'post_footer', Array, Array)
#12 src/XF/Template/Templater.php(987): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, Object(XF\Template\ExtensionSet))
#13 src/XF/Template/Templater.php(923): XF\Template\Templater->renderExtensionInternal('footer', Array, Array, Object(XF\Template\ExtensionSet))
#14 internal_data/code_cache/templates/l1/s6/public/post_macros.php(134): XF\Template\Templater->renderExtension('footer', Array, Object(XF\Template\ExtensionSet))
#15 src/XF/Template/Templater.php(987): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, Object(XF\Template\ExtensionSet))
#16 src/XF/Template/Templater.php(923): XF\Template\Templater->renderExtensionInternal('main_cell_inner', Array, Array, Object(XF\Template\ExtensionSet))
#17 internal_data/code_cache/templates/l1/s6/public/post_macros.php(145): XF\Template\Templater->renderExtension('main_cell_inner', Array, Object(XF\Template\ExtensionSet))
#18 src/XF/Template/Templater.php(987): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, Object(XF\Template\ExtensionSet))
#19 src/XF/Template/Templater.php(923): XF\Template\Templater->renderExtensionInternal('main_cell', Array, Array, Object(XF\Template\ExtensionSet))
#20 internal_data/code_cache/templates/l1/s6/public/post_macros.php(157): XF\Template\Templater->renderExtension('main_cell', Array, Object(XF\Template\ExtensionSet))
#21 src/XF/Template/Templater.php(987): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, Object(XF\Template\ExtensionSet))
#22 src/XF/Template/Templater.php(923): XF\Template\Templater->renderExtensionInternal('full_body', Array, Array, Object(XF\Template\ExtensionSet))
#23 internal_data/code_cache/templates/l1/s6/public/post_macros.php(202): XF\Template\Templater->renderExtension('full_body', Array, Object(XF\Template\ExtensionSet))
#24 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, Object(XF\Template\ExtensionSet))
#25 src/addons/MaZ/AMP/XF/Template/Templater.php(139): XF\Template\Templater->callMacro('post_macros', 'post', Array, Array, Object(XF\Template\MacroState))
#26 internal_data/code_cache/templates/l1/s6/public/thread_view.php(1035): MaZ\AMP\XF\Template\Templater->callMacro(NULL, 'post_macros::po...', Array, Array)
#27 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, Object(XF\Template\ExtensionSet))
#28 src/addons/MaZ/AMP/XF/Template/XF22/Templater.php(52): XF\Template\Templater->renderTemplate('thread_view', Array, true, NULL)
#29 src/XF/Template/Template.php(24): MaZ\AMP\XF\Template\XF22\Templater->renderTemplate('public:thread_v...', Array)
#30 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#31 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#32 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#33 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#34 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#35 src/XF/App.php(2352): XF\Mvc\Dispatcher->run()
#36 src/XF.php(524): XF\App->run()
#37 index.php(20): XF::runApp('XF\\Pub\\App')
#38 {main}

Request state

array(4) {
  ["url"] => string(54) "/"
  ["referrer"] => string(54) "/page-147"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
The error is generated in my add-on's template due to invalid user.
Try editing siropu_easy_user_ban_macros and where you find $thread AND replace with $thread AND $user AND
 
I'm getting the errors reported by @Nirjonadda but also others:

Code:
Server error log

    XF\Db\Exception: MySQL query error [1364]: Field 'siropu_easy_user_ban_forum' doesn't have a default value src/XF/Db/AbstractStatement.php:230

    Generated by: Unknown account Jun 18, 2022 at 7:27 AM

Stack trace

INSERT  INTO `xf_user` (`visible`, `activity_visible`, `user_group_id`, `timezone`, `language_id`, `last_summary_email_date`, `username`, `email`, `user_state`, `privacy_policy_accepted`, `terms_accepted`, `display_style_group_id`, `secondary_group_ids`, `secret_key`, `user_id`, `username_date`, `username_date_visible`, `style_id`, `permission_combination_id`, `message_count`, `question_solution_count`, `alerts_unviewed`, `alerts_unread`, `conversations_unread`, `register_date`, `last_activity`, `trophy_points`, `avatar_date`, `avatar_width`, `avatar_height`, `avatar_highdpi`, `gravatar`, `security_lock`, `is_moderator`, `is_admin`, `is_staff`, `is_banned`, `reaction_score`, `vote_score`, `custom_title`, `warning_points`, `snog_flag`, `andrew_user_note_count`, `andy_cover_photo`, `andy_most_reactions_count`, `mad_last_check`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(198): XF\Db\AbstractStatement->getException('MySQL query err...', 1364, 'HY000')
#1 src/XF/Db/Mysqli/Statement.php(79): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1364, 'HY000')
#2 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(220): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1514): XF\Db\AbstractAdapter->insert('xf_user', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1246): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/XF/Service/User/Registration.php(301): XF\Mvc\Entity\Entity->save()
#7 src/addons/Hampel/ApprovalQueuePlus/XF/Service/User/Registration.php(7): XF\Service\User\Registration->_save()
#8 src/XF/Service/ValidateAndSavableTrait.php(42): Hampel\ApprovalQueuePlus\XF\Service\User\Registration->_save()
#9 src/XF/Pub/Controller/Register.php(426): XF\Service\User\Registration->save()
#10 src/addons/OzzModz/SpamEmailAddress/XF/Pub/Controller/Register.php(28): XF\Pub\Controller\Register->actionRegister()
#11 src/XF/Mvc/Dispatcher.php(352): OzzModz\SpamEmailAddress\XF\Pub\Controller\Register->actionRegister(Object(XF\Mvc\ParameterBag))
#12 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Register', 'Register', Object(XF\Mvc\RouteMatch), Object(OzzModz\SpamEmailAddress\XF\Pub\Controller\Register), NULL)
#13 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(OzzModz\SpamEmailAddress\XF\Pub\Controller\Register), NULL)
#14 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#15 src/XF/App.php(2352): XF\Mvc\Dispatcher->run()
#16 src/XF.php(524): XF\App->run()
#17 index.php(20): XF::runApp('XF\\Pub\\App')
#18 {main}

Request state

array(4) {
  ["url"] => string(18) "/register/register"
  ["referrer"] => string(38) "{thread in domain forum}"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(14) {
    ["_xfToken"] => string(8) "********"
    ["username"] => string(0) ""
    ["38c37761af6fcaed3dc8209d13d642462ac435aa"] => string(9) "member"
    ["493c1da28023c7e03133772f62f0b2c24ec93ae9"] => string(21) "member@outlook.com"
    ["1bd791973e484b500cbcf2eeef7cec2ddb5ae0e3"] => string(8) "********"
    ["location"] => string(8) "New York"
    ["custom_fields"] => array(2) {
      ["gender_field"] => string(1) "1"
      ["what_is_your_favorite"] => string(3) "RED"
    }
    ["g-recaptcha-response"] => string(484) "03AGdBq27Cus18RhD4qRR9CpDLRouM9VcTvqfoXJ2euQ7acieHb6KeG1_yXosiRpLP9GD9g_VkRonsLYQjDVOIHXAjI4iS89_VgtXrX7WMn_Ql-CDcxcdNO9bI9U7lvIA1K1iPbeeqJ0TttANwYmbFA9tqHknlCRN1KwxrBHcbni48Y_zFS9dvB-9Gnbm8bRUYPfwTua0OJjsBt5WvAzPhIB0qoT2CTRn-FjMxpfxRWEbDmB5JSzXHHWYMGmPflCzz6fnqyYxgjJNAt6GCgEYT7iT3oaP7OKDKJOAIksz212diaMKiUQltwWkk_ejeO-Gn7fPi8PDbfuc8gwW0JSlWVBhx6bHTtJNGZZAsRm068ZcoB_E5fVSX8IvO-66GnPRO5Fy7a2EG7AqXZ3Ww9PmriljRkksYoyApfWp9X6LHXW3NKqAbbqWG-EWW3aT533Dvq9hN4lLc3J_xBhXUSgHoXr5Cn9gKO-ghmA"
    ["accept"] => string(1) "1"
    ["reg_key"] => string(16) "Cy416Qq4ly2mOVkB"
    ["1ee9024def39952e5c7b0f0938837ef13adfeb2c"] => string(13) "Asia/Tashkent"
    ["_xfRequestUri"] => string(19) "{thread URL}"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
Siropu updated Easy User Ban 2 by Siropu with a new update entry:

Improvements & Bug Fixes

Added ban/unban thread notifications for forum and thread bans.
Added the ability to use minutes in forum and thread bans.
Moved the content used in thread notification posts from file to template to allow customization (changes only affect new posts).
Added cron job to delete expired forum and thread bans (if expired they still get deleted when the user visits the forum/thread in which has been banned). The cron has been added to clear the public ban list from expired bans where banned...

Read the rest of this update entry...
 
Hello,

I just bought and installed the addon. There were problems with @Kirby "FontAwesome" addon. Nevertheless, it was finally installed. I uninstalled the outdated Kirby addon and installed the latest version.
Unfortunately I can't find anything like this: "Link to quick ban/unban users directly from their profile, thread posts, profile posts and conversation messages"

What could be the reason?

Best regards,
Silmarillion
 
Everything on YES for all all user groups?
No. There are two sets of permissions: Easy User Ban: User permissions and Easy User Ban: Moderator permissions
You can set the user permissions to Yes for "Registered" user group and the moderator permissions to yes for the admin and moderator user groups.
 
easyuserban.webp

Do I understand this in the right manner? "UserPermissions" everything set to YES, but only for the "Registered Members" user group?
And under "Moderator Permissions" everything on YES for the user groups "Moderator" and "Admin"?

All other user groups, including the "Blocked Members" user group, therefore remain set to NO?

Under "Temporary ban user group:" I entered "Banned/Blocked Members". Is that correct, or should I leave the field blank?

Best regards,
Silmarillion
 
I blocked a user via the new addon for the first time today. This is a subforum ban for seven Days.
I then got the following error message:

Code:
    XF\Db\Exception: MySQL query error [1265]: Data truncated for column 'ban_type' at row 1 src/XF/Db/AbstractStatement.php:228

    Generiert von: xxxxxx 5 Dezember 2022 um 22:29

Stack-Trace

INSERT  INTO `xf_siropu_easy_user_ban_log` (`ban_type`, `item_id`, `action`, `action_user_id`, `action_reason`, `user_id`, `end_date`, `ips`, `date`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1265, '01000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1265, '01000')
#2 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(218): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1510): XF\Db\AbstractAdapter->insert('xf_siropu_easy_...', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1242): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/addons/Siropu/EasyUserBan/Service/Moderator.php(182): XF\Mvc\Entity\Entity->save()
#7 src/addons/Siropu/EasyUserBan/Service/Moderator.php(94): Siropu\EasyUserBan\Service\Moderator->logAction('ban')
#8 src/addons/Siropu/EasyUserBan/XF/Pub/Controller/Member.php(207): Siropu\EasyUserBan\Service\Moderator->ban()
#9 src/XF/Mvc/Dispatcher.php(350): Siropu\EasyUserBan\XF\Pub\Controller\Member->actionQuickBan(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Member', 'QuickBan', Object(XF\Mvc\RouteMatch), Object(Siropu\EasyUserBan\XF\Pub\Controller\Member), NULL)
#11 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(Siropu\EasyUserBan\XF\Pub\Controller\Member), NULL)
#12 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(2326): XF\Mvc\Dispatcher->run()
#14 src/XF.php(488): XF\App->run()
#15 index.php(20): XF::runApp('XF\\Pub\\App')
#16 {main}
What could be the reason?
However, a message was created in the internal team forum with information about the ban.
 
What could be the reason?
It is a bug in the installation process. It has a wrong field type that was added recently. The upgrade used the correct values but the install has a wrong value.

Until is fixed you can make the change yourself if you want from the database for xf_siropu_easy_user_ban_log table. Change ban_type from 'board', 'node', 'thread' to 'board', 'forum', 'thread'
 
It is a bug in the installation process. It has a wrong field type that was added recently. The upgrade used the correct values but the install has a wrong value.

Until is fixed you can make the change yourself if you want from the database for xf_siropu_easy_user_ban_log table. Change ban_type from 'board', 'node', 'thread' to 'board', 'forum', 'thread'
Can i change this via the XF-Admin-CP? If yes, where can i find it?
 
Can only be done via database.

I changed it in the database and the error is gone.

However, there is still a small problem that surprises me: Yesterday I blocked a test account for 60 minutes for test purposes. At 10:13 p.m. it should have been activated again. But this only happened at 10:46 p.m. What can be the reason?

Best regards,
Chris
 
Top Bottom