Users Expire

From TNG_Wiki
Jump to: navigation, search
Restricted Downloads of Users Expire are restricted to logged in users. If you do not have a user account on the TNG Wiki use the Request Account link to request a user account Restricted

In TNGv12 and beyond, this mod uses the new guidelines for TNG v12+ cust_text.php files
If you are using TNGv12+, and any cust_text.php file in this mod is marked with a Bad Target error, you need to update your cust_text.php files before you can install this mod. [Show instructions]

If you upgraded to TNGv12+, and did not update your cust_text.php files as instructed in the upgrade readme script, then you must use the TNG Mod Manager to update them. To do so:

  1. Go to Mod Manager, and select its "Recommended Updates" tab.
    (If the "Recommended Updates" tab is not visible, then go to the Mod Manager Options tab, select "Display Settings", and turn on the "Recommended Updates" tab.)
  2. Click the "Update" button in the "Recommended Updates" tab.
    Installed mods do not interfere with the update, and if you already have (or think you may have) run this update, it will not hurt for you to run it again.

[See details in the TNGv12 Change Impacts Article][Hide the instructions]


Users Expire
Summary Add option to show title to media shown on one row. Also add option to allow media other than photos to show on one row when not attached to an event.
Validation
Mod Updated 13 Oct 2019
Download link users_expire_v12.0.2.0
TNG 12.0.2
Download stats See download statistics
Author(s) Brent Hemphill
Homepage Person Media Title (This page)
Mod Support TNG Community Forums
Contact Developer
Latest Mod 12.0.2.0
Min TNG V 12.0.2
Max TNG V 12.2
Files modified
admin_adduser.php
admin_edituser.php
admin_newuser.php
admin_updateuser.php
processlogin.php
languages/English/cust_text.php
languages/English/users_help.php
languages/English-UTF8/cust_text.php
languages/Danish/cust_text.php
languages/Danish-UTF8/cust_text.php
languages/German/cust_text.php
languages/German-UTF8/cust_text.php
Related Mods
none
Notes



Purpose of the mod

This TNG modification adds a field to Admin >> Users to allow the adding of an expiration date for automatic expiration.

When you add or update a user, a new field of "Expires After:" will be available. You can use the calendar form to pick the date. The default is for this to be left blank.

When a user attempts to log in after the date they are set to expire, their account will automatically be disabled and not allow them to log in due to the account being disabled. The user can log in anytime during the day you have set to expire after, but at the very start of the next day they will end up getting disabled on login attempt. It into account the offset from UTC set in Setup >> Configuration >> General Settings >> Miscellaneous > "Server time offset (hours):", so that it is the start of the day from the location where you have the server set to be located not the location of the user.

If a user is logged in when the time comes for their account to expire, the existing session will continue to be valid. The mod only checks the user at login. So an active session that is closed by log out or closing of the browser will terminate the session and enforce the account check at the next opening and login attempt.

This allows you to create users that automatically expire so that you do not need to remember to go back and manually disable the account. It could be useful for creating temporary guest access to a closed site, temporary help through the forum or personal messages, as part of a subscription to you site, or as a way to limit how long a user may have more elevated privileges. In the last case, it may be that you have someone who is going to be making several updates for say a couple of weeks but then you want them to go back to being a normal user, you could use this setting them to expire and then if you forgot to change them back they would instead be contacting you to say they can't get in. Basically any temporary or time constrained use case that you can think of for a user's access could be a case for using this mod.

Developer

The Users Expire mod was developed by Brent Hemphill.
German text provided by Jürgen Bourdeaux.
Danish text provided by Mogens Fenger.

Revision History

Version Date Contents
v12.0.2.0 May 4, 2019 initial release

Requirements

TNG version: 12.0.2
  • A working TNG installation.
  • A backup of all affected files (see the list in the summary in the upper right corner of the page)
  • An installed current version of the Mod Manager.
  • Both English and English-UTF8 folders be on your site

Installation

  1. Download the appropriate zip file as shown in the summary in the upper right corner of the page.
  2. Extract the file from the downloaded zip file into the mods folder or FTP the extracted file to your mods folder.
  3. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files to install the mod.

First Time Post Install Actions

  1. Click the Expand Tables button shown on the Mod Manager screen to expand the user table.

Custom Text

This MOD contains custom text in cust_text.php in the English / English-UTF8 folders. It also adds to the users_help.php file in the English folder.

cust_text.php

The following custom text entries need to be created in your language, if you do not use English for TNG Admin

//Users Expire Text
$admtext['dtexpires'] = "Expires After:";

In the event of a problem

  • Try using the Mod Manager Remove capability
  • Contact us through the TNG forum.
  • Copy the backup of the affected files back to your TNG directory

Sites using this mod

If you download and install this mod, please add your TNG site to the table below:

URL User Note Mod-Version TNG-Version User-language
Brent Hemphill Private Site/localhost 12.1.0.0 12.1.0 English