DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • January 23, 2018, 03:28:56 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: Grotto Logout v0.0.5  (Read 5000 times)
0 Members and 1 Guest are viewing this topic.
MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1741


View Profile
« on: June 02, 2009, 11:40:37 AM »

Grotto Logout v0.0.5

Been meaning to do this for a while. A log out option in the grotto for superusers. Each person must be granted access for the link to be available unless they're a megauser. Smiley

There's a setting for the location name. When somebody views the list warriors page, your location will show as that name instead of the village name.

Updates:
07/06/09 - v0.0.2
+ Added a check for when you log out twice or more from the grotto having never gone to Mundane in between. Stops the wrong location being saved.
26/06/09 - v0.0.3
+ Rewrote the code. Now hooks into login and logout and sets your location there.
23/03/10 - v0.0.4
+ Added extra IF check to logout hook as logging in always put me in the grotto even when logging out to the fields.
20/06/2013 - v0.0.5
+ Added else check to stop demoted players getting the 'hacked' page if their session restore page is superuser.php. Thanks 'The Doctor'. Smiley


Feedback, bugs, comments welcome. Smiley

Zip file attached.
« Last Edit: June 20, 2013, 03:10:23 PM by Afkamm » Logged

Contessa*Seasons
Militia
**
Offline Offline

Posts: 60



View Profile WWW
« Reply #1 on: June 09, 2009, 11:27:18 AM »

I love this thing!!!  Marc you're amazing! Smiley But you already knew that didn't you.  (winks)
Logged

Embrace the passion of the adventure and sail into the Land of Tarkenna
Aeolus
Mod God
*****
Offline Offline

Posts: 1819


You're welcome.


View Profile WWW
« Reply #2 on: June 20, 2013, 03:59:04 AM »

Bit of an old post, I know, but a suggestion for fellow admins who use this module.

If a Staffer logs out, their 'restorepage' will be saved as 'superuser.php'. If they are then removed from Staff while they are logged out, and then they log back in, they will appear to be 'hacking' the superuser pages.

To fix this, REPLACE the last curly-bracket inside the dohook() function (i.e. the one before return $args;) with the following code:

Code:
<?php
} else {
if ($session['user']['restorepage'] == "superuser.php"$session['user']['restorepage'] = "village.php";
}
Logged

MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1741


View Profile
« Reply #3 on: June 20, 2013, 03:06:32 PM »

Ah good to know, I'll update the module. Smiley

...

V0.0.5 is now available. Smiley
« Last Edit: June 20, 2013, 03:11:00 PM by Afkamm » Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Play LoGD on Dragonprime

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
31 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search