If you have Log In Required plugin for elgg running on your website, it might still be required to allow public access to member profile pages. To achieve this, it is required to edit the plugin itself. Don’t worry, the steps are pretty simple and straight forward.

To allow access to profile pages, all you need to do is change the following lines:

  1. if (!in_array(strtolower(trim($current_url)), array_map('strtolower', $allow)))
  2. gatekeeper();

to

  1. if (!in_array(strtolower(trim($current_url)), array_map('strtolower', $allow)) && get_context() !== 'profile')
  2. gatekeeper();

This change will allow access to the profile page showing the profile information only without the content of the widgets available for public viewing and guests.

If moreover you would like to allow the profile widgets to show content, use the following instead of the above code:

  1. if (!in_array(strtolower(trim($current_url)), array_map('strtolower', $allow)) && get_context() !== 'profile' && get_context() !== 'widget')
  2. gatekeeper();