View Arck Interactive's plugins
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
so if the blocked user can see the activity events from the blocker, are they able to comment on them there?
Hello, this plugin is very necessary. But in Elgg 2.3 error occurs. Is there an update forecast?
Erro in Elgg 2.3.2
Argument 1 passed to MFP\BlockUsers\is_blocked() must be an instance of ElggUser, null given, called in /home/familia1/public_html/mod/block_users/start.php on line 183
TypeError Object
(
[message:protected] => Argument 1 passed to MFP\BlockUsers\is_blocked() must be an instance of ElggUser, null given, called in /home/familia1/public_html/mod/block_users/start.php on line 183
[string:Error:private] => TypeError: Argument 1 passed to MFP\BlockUsers\is_blocked() must be an instance of ElggUser, null given, called in /home/familia1/public_html/mod/block_users/start.php on line 183 and defined in /home/familia1/public_html/mod/block_users/lib/functions.php:49
Stack trace:
#0 /home/familia1/public_html/mod/block_users/start.php(183): MFP\BlockUsers\is_blocked(NULL, Object(ElggUser))
#1 [internal function]: MFP\BlockUsers\check_page_owner('pagesetup', 'system', NULL)
#2
This error happens when the user is locked. Should show the blocked page then this error happens.
Can someone help me with this problem? Any idea? Important network user may be able to block another user. Does anyone have any type and block on the network that can help?
Hi @Vagsiarom, The plugin worked fine with Elgg 2.3.3. I blocked a user and then I tried to view the user profile and it showed me the blocked page with the message "You are trying to view content from or perform an action on a user that you have blocked. To see this user's content, you must first unblock the user."
Do let me know how did you got the error? What action were you performing? A little more details would help.
Thank you Rohita. My Elgg is version 2.3.2. The problem occurs when you block the user. The error I posted here appears. This error is in the blocked user profile and only in it. And only appears to who blocked. If you can help me, thank you.
Rohita updated my elgg for 2.3.3 and even then the error persists. Can anyone help?
Only looked at the code and not tried myself. But I think it might help to change line 172 of start.php a little bit. The modified code would be
checking also if $page_owner is a user entity (as this might not be always the case - for example not in groups).
Iionly, you're awesome. Only yourself to solve this. thank you so much. Line 172 of start.php has "if (! $ Page_owner)" change to "if (! $ Page_owner instanceof \ ElggUser)". Probema solved. Thank you master iionly.
Iionly! Now another problem with user lock plugin. When you are going to send a message to a new name, see the error below:
Argument 2 passed to MFP\BlockUsers\is_blocked() must be an instance of ElggUser, boolean given, called in /home/familia1/public_html/mod/block_users/start.php on line 248
TypeError Object
(
[message:protected] => Argument 2 passed to MFP\BlockUsers\is_blocked() must be an instance of ElggUser, boolean given, called in /home/familia1/public_html/mod/block_users/start.php on line 248
[string:Error:private] => TypeError: Argument 2 passed to MFP\BlockUsers\is_blocked() must be an instance of ElggUser, boolean given, called in /home/familia1/public_html/mod/block_users/start.php on line 248 and defined in /home/familia1/public_html/mod/block_users/lib/functions.php:49
Stack trace:
#0 /home/familia1/public_html/mod/block_users/start.php(248): MFP\BlockUsers\is_blocked(Object(ElggUser), false)
#1 [internal function]: MFP\BlockUsers\messages_send_action('action', 'messages/send', true, NULL)
#2 /home/familia1/public_html/vendor/elgg/elgg/engine/classes/Elgg/PluginHooksService.php(52): call_user_func_array('MFP\\BlockUsers\\...', Array)
#3 /home/familia1/public_html/vendor/elgg/elgg/engine/classes/Elgg/ActionsService.php(166): Elgg\PluginHooksService->trigger('action', 'messages/send', NULL, true)
#4 /home/familia1/public_html/vendor/elgg/elgg/engine/lib/actions.php(22): Elgg\ActionsService->execute('messages/send')
#5 [internal function]: _elgg_action_handler(Array, 'action')
#6 /home/familia1/public_html/vendor/elgg/elgg/engine/classes/Elgg/Router.php(100): call_user_func('_elgg_action_ha...', Array, 'action')
#7 /home/familia1/public_html/vendor/elgg/elgg/engine/classes/Elgg/Application.php(436): Elgg\Router->route(Object(Elgg\Http\Request))
#8
Can someone help me????
Help you scream? Sure!
Can someone help me????
I do not think you understand me because the translator may not turn my ideas in a way that can be understood. Anyway, thanks for showing up here. There is already a history with every event with plugin block user. If you can not help please do not play or get in the way. I still need help. Iionly helped in the beginning when I changed Line 172 of start.php has "if (! $ Page_owner)" change to "if (! $ Page_owner instanceof \ ElggUser)". But now I have discovered that there is an error on line 248 when I send a message.
Now another problem with user lock plugin. When you are going to send a message to a new name, see the error below:
Argument 2 passed to MFP\BlockUsers\is_blocked() must be an instance of ElggUser, boolean given, called in /home/familia1/public_html/mod/block_users/start.php on line 248
TypeError Object
(
[message:protected] => Argument 2 passed to MFP\BlockUsers\is_blocked() must be an instance of ElggUser, boolean given, called in /home/familia1/public_html/mod/block_users/start.php on line 248
[string:Error:private] => TypeError: Argument 2 passed to MFP\BlockUsers\is_blocked() must be an instance of ElggUser, boolean given, called in /home/familia1/public_html/mod/block_users/start.php on line 248 and defined in /home/familia1/public_html/mod/block_users/lib/functions.php:49
Stack trace:
#0 /home/familia1/public_html/mod/block_users/start.php(248): MFP\BlockUsers\is_blocked(Object(ElggUser), false)
#1 [internal function]: MFP\BlockUsers\messages_send_action('action', 'messages/send', true, NULL)
#2 /home/familia1/public_html/vendor/elgg/elgg/engine/classes/Elgg/PluginHooksService.php(52): call_user_func_array('MFP\\BlockUsers\\...', Array)
#3 /home/familia1/public_html/vendor/elgg/elgg/engine/classes/Elgg/ActionsService.php(166): Elgg\PluginHooksService->trigger('action', 'messages/send', NULL, true)
#4 /home/familia1/public_html/vendor/elgg/elgg/engine/lib/actions.php(22): Elgg\ActionsService->execute('messages/send')
#5 [internal function]: _elgg_action_handler(Array, 'action')
#6 /home/familia1/public_html/vendor/elgg/elgg/engine/classes/Elgg/Router.php(100): call_user_func('_elgg_action_ha...', Array, 'action')
#7 /home/familia1/public_html/vendor/elgg/elgg/engine/classes/Elgg/Application.php(436): Elgg\Router->route(Object(Elgg\Http\Request))
#8
I think in later versions of the messaging plugin the input changed, you'll need to see what is passed and correct accordingly. There is no get_input('recipient_username') so $user ends up being null which triggers the error.
I think it should work with modifying the messages_send_action() function in start.php to
But as I don't use this plugin I haven't tested the code.
Master Iionly once again I thank you very much. Problem solved. I wanted to have this knowledge but I'm working hard for it. I would update a lot of plugins that are interesting but have been forgotten. Thank you!
Thank you Matt.
Blocked user can comment on my blog from the activity stream. That sort of defeats the purpose of blocking,