Warning: This plugin has't been updated in over 54 years. It may no longer be maintained.
What you can do to help:
Require logged in user for all pages except for:
For developers: If you would like to add more allowed public view pages, you can register your own hook:
register_plugin_hook('login_required','login_required', 'your_function_name');
Make sure to return an array of page URL's. For more information, I have a working example in the plugin itself made for demonstration purposes.
To allow access to profile pages: Change the following:
if (!in_array(strtolower(trim($current_url)), array_map('strtolower', $allow)))
gatekeeper();
to
if (!in_array(strtolower(trim($current_url)), array_map('strtolower', $allow)) && get_context() !== 'profile' && get_context() !== 'widget')
gatekeeper();
Note: If you do not want the widgets to show any content, you can remove the
&& get_context() !== 'widget'
from the end of this statement. It will allow access to the profile page showing the profile information only.
View Khaled Afiouni'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.