Hi, everyone here. Are you know how to make activity accessible for logged in user only. I know about using of gatekeeper();
But I can't find which mod that handle activity onn Elgg 1.8.11. I have searching on Google, but what I found can't be applied on Elgg 1.8.11
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.
One suggestion earlier in the thread was:
$url = "http://" . $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; // gets current site url
if(($url == 'http://www.flenzzbility.com/activity') && elgg_is_logged_in() == FALSE) {
header( 'Location: http://www.flenzzbility.com' ); // redirection location
}
I would suggest the following:
$url = "http://" . $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; // gets current site url
if ((false !== strpos($url,'activity')) && elgg_is_logged_in() == FALSE) {
header( 'Location: http://www.flenzzbility.com' ); // redirection location
}
This will block all your urls that contain the word activity. Otherwise, if you block only 'http://www.flenzzbility.com/activity', then your activity is still visible if you add a slash 'http://www.flenzzbility.com/activity/' and 'http://www.flenzzbility.com/activity/somethingelse' would be visible too.
- Previous
- 1
- 2
- 3
- 4
- 5
- 6
- Next
You must log in to post replies.