Loading...
 
Features / Usability

Features / Usability


Re: Re: How to show a module to Anonymous users *only* ? (workaround)

posts: 4656 Japan

For now, to separate Anonymous group from other groups, you can apply this hack from alt.thetinfoilhat.com to tikilib.php and userslib.php (as quoted from that page — not sure if that site is still online or not, but I want to give credit):

Both in tikilib.php and userslib.php the Anon group gets added to a user's list of groups; around line 1030 (Tiki 1.8.2) in tikilib.php:

Copy to clipboard
$ret[] = "Anonymous";


Replace this line with a conditional statement (otherwise Anonymous group won't work) (lines 1031-1033):

Copy to clipboard
if(count($ret) == 0) { // This could be an option in the admin menu $ret[] = "Anonymous"; }


And in /lib/userlib.php,
Same change as in tikilib.php, at around lines 732-735 (Tiki 1.8.2).

I use this at a couple of sites and it works fine, with no problems.

-- Gary

There are no comments at this time.

Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting