Session Length
Complete administrator, subscription, update, deployment, and troubleshooting documentation for the standalone Joomla extension.
1. Overview
Session Length is extension wich manage timed subscriptions with custom start and expiration dates, and automatic access removal when a subscription expires. Limit authenticated frontend sessions to a duration of your choice for specific user groups or individual users, and control how frequently users can log in.
Session Length limits authenticated frontend sessions to an absolute duration. It displays a persistent countdown and logs the user out at zero. Server-side checks enforce expiry even when JavaScript is disabled, interrupted, or modified. See Admin settings for better understanding.
The extension also includes a standalone timed-subscription manager. Administrators create one subscription record per Joomla user, select how it starts, and control which Joomla groups require active subscriptions.
Session Length Use Cases
Flexible session, login, and subscription rules for different types of Joomla websites.
Membership Website
Give members long-term access while controlling the maximum duration of each individual login session.
- Subscription 365 days
- Session 180 minutes
- Login frequency Unlimited
Online Course
Start access when the student logs in for the first time and restrict excessive account sharing.
- Subscription 30 days from first login
- Session 120 minutes
- Login frequency Max. 3 / 24 hours
Temporary Customer Portal
Grant a customer access only during a specific project, service period, or agreed date range.
- Subscription Exact start & expiry dates
- Session 60 minutes
- User rule Individual override
Demo / Trial Account
Provide controlled trial access without leaving demo accounts available indefinitely.
- Subscription 7 days
- Session 30 minutes
- Login frequency Max. 5 / day
2. Package architecture
Creates and manages individual user subscription records.
Resolves session rules and enforces login, session, and subscription limits.
Displays the countdown in a selected template position.
Adds a saved customer key only to matching Session Length update downloads.
Installs and upgrades every constituent together.
Advertises the supported Joomla/PHP versions, release URL, and SHA-256.
Customer sites install only pkg_sessionlength_vVERSION.zip. Do not ask customers to install constituent ZIP files separately.
3. Requirements and scope
| Requirement | Value |
|---|---|
| CMS | Joomla 6 |
| PHP | 8.3 or newer within Joomla-supported versions |
| Database | MySQL/MariaDB supported by Joomla |
| Applies to | Authenticated public-site users |
| Excluded | Guests and Joomla Administrator requests |
| Optional shop integration | VirtueMart plus VM Update Key Manager on the seller's site only |
4. Installation and initial setup
- Use the built installer
dist/pkg_sessionlength_v1.1.5.zip. - Open System → Install → Extensions.
- Upload the package ZIP.
- Confirm these extensions exist under System → Manage → Extensions: component, system plugin, installer plugin, and module.
- Open System → Manage → Plugins → System - Session Length.
- Configure duration rules before publishing the countdown module.
Updating an existing installation
Upload the newer parent package over the existing version. The package uses Joomla's upgrade method and preserves configuration and subscription data. Upgrades from the old exemption-only subscription setting preserve that behavior by migrating it to Excluded mode.
5. Session duration rules
Session duration and subscription duration are separate concepts. The session rule controls how long one login lasts. The subscription record controls the period during which the user may access the frontend.
Rule priority
- Individual user rule.
- Matching Joomla user-group rule.
- Default duration when the user is directly assigned to a selected default-duration group.
Every rule contains a duration and warning threshold in minutes. If several group rules match, choose either the shortest or longest matching rule. The warning threshold is taken from the same winning rule.
| Setting | Purpose |
|---|---|
| Default duration | Fallback session duration when no user/group override matches and the user is in the selected direct group scope. |
| Default warning threshold | When the countdown changes to its warning state. |
| Default duration user groups | Directly assigned groups for which the fallback default applies. An empty selection applies it to every authenticated frontend user. |
| User-group rules | Different session limits for directly or authoritatively matched Joomla groups. |
| Multiple-group strategy | Selects shortest or longest when several configured rules match. |
| Individual rules | Highest-priority override for a particular Joomla user. |
6. Login frequency limit
The optional frequency limiter restricts successful frontend logins within a rolling number of hours. For example, a maximum of 3 logins over 24 hours permits three successful public-site logins in any rolling 24-hour period.
- Administrator logins are not counted.
- Selected Joomla groups can be exempt.
- Counts are stored in the database and are not reset by clearing browser storage.
- When blocked, Joomla ends the attempted login and shows an approximate wait time.
7. Standalone subscriptions
Open Components → Session Length Subscriptions. Each Joomla user may have one subscription record.
Recommended setup
- Create a Joomla group such as Paid Subscribers.
- Directly assign paid users to that group.
- Create one subscription record for each user.
- In the system plugin, select Included groups require a subscription.
- Select Paid Subscribers.
- Enable Require an active subscription only after records and groups are ready.
Access states
| State | Frontend result |
|---|---|
| Active and in date | Login and frontend requests are allowed. |
| Pending first login | The first successful frontend login activates the purchased duration. |
| Missing record | Access is denied when the user's group is protected. |
| Expired | Login is denied; an existing frontend session is ended on its next request. |
| Paused or revoked | Access is denied until the administrator changes the status. |
8. Included and Excluded group modes
| Mode | Selected groups | Empty selection |
|---|---|---|
| Included (default) | Only directly assigned members require an active subscription. | Nobody requires a subscription. |
| Excluded | Directly assigned members do not require a subscription; all other frontend users do. | Every non-administrator frontend user requires a subscription. |
Super Users and Joomla Administrator access remain excluded in both modes.
9. Subscription component fields
| Field | Behavior |
|---|---|
| Joomla user | The individual account receiving access. A user can have only one record. |
| Status | Active, Paused, or Revoked. |
| Activation | Start immediately or on the first successful frontend login. |
| Purchased duration (days) | Used when expiration is empty. Default: 30 days. |
| Starts at | Optional UTC-backed start. Immediate records default to the save time when empty. |
| Expires at | Optional explicit expiry. When empty, it is calculated from start plus purchased days. |
| Administrative note | Internal text for order/reference information. |
Duration calculation
- If both start and expiration are selected, their exact difference is stored internally in minutes.
- If expiration is empty, purchased days are multiplied by 1,440 minutes.
- Expiration must be later than start.
- Existing minute-based database records remain compatible and display as days in the form.
Extending a subscription
For a precise renewal date, edit Expires at. To calculate a new expiry from days, set the purchased days and clear Expires at before saving.
10. Countdown module
- Open Content → Site Modules.
- Create or open Session Length Countdown.
- Select the template position, menu assignments, and registered access level.
- Choose the light or dark theme and optionally change the label.
- Publish the module.
The module renders nothing for guests. It uses the warning threshold selected by the active session rule. When subscription expiry occurs before session expiry, the earlier subscription deadline wins.
11. Protected automatic updates
The package registers this public update feed:
https://shop.topoweryou.com/files/updatesxml/sessionlength.xml
Customers enter their key under:
System → Manage → Plugins → Installer - Session Length Update Key
The installer plugin sends the key only when all of these match:
- Host:
shop.topoweryou.com - Component:
com_vmupdatekeymanager - Task:
download.get - Filename:
pkg_sessionlength_vMAJOR.MINOR.PATCH.zip
The plugin converts /index.php to the canonical / endpoint before downloading, avoiding the host's HTTP 301 redirect that Joomla's installer does not follow in this path.
12. Security and operational notes
- Session expiry is enforced on the server, not only by the countdown.
- Refreshes and extra browser tabs do not reset the deadline.
- The update key is restricted to the expected host, endpoint, and package filename.
- Protected ZIP files belong under the Safe Path, outside public web storage.
- Super Users and Administrator requests are excluded from subscription enforcement.
Joomla Shared Sessions
If Joomla Shared Sessions is enabled, a frontend logout can also invalidate the same browser's Administrator session. Keep Shared Sessions disabled when administrator continuity is important. Changing Joomla's Shared Sessions setting invalidates existing sessions.
13. Troubleshooting
| Problem | Checks and resolution |
|---|---|
| 404 Component not found | Install the parent package, not a source ZIP. Confirm com_sessionlength exists under Manage Extensions. Version 1.1.0 and newer packages include the component constituent. |
| DatabaseQuery::bind reference error | Install version 1.1.1 or newer. The package post-install script binds a local variable as Joomla requires. |
| Failed to download package | Confirm the installer-key plugin is enabled and the Session Length product key is saved. Confirm the licence is active/unexpired, package prefix is pkg_sessionlength_v, and the requested ZIP exists in the licence's protected folder. |
| Direct URL returns Forbidden | Expected without a valid key. A key from another product cannot download Session Length. |
| Update URL redirects | Version 1.1.3+ normalizes the shop path to / before adding the key. |
| Countdown does not appear | Confirm the system plugin is enabled, the user is logged in, the module is published in a real template position, access is Registered, and its menu assignment includes the current page. Also confirm the user has an individual/group duration rule or is directly assigned to a selected Default duration user group. |
| User unexpectedly requires a subscription | Check Included/Excluded mode and the user's direct Joomla group assignments. Remember that Excluded mode with no selected groups protects everyone except administrators. |
| User bypasses subscription | Check that enforcement is enabled, Included mode contains the user's directly assigned group, and the user is not a Super User. |
| First-login subscription never starts | Confirm the record is Active, has no start/expiry values, and the user completes a successful public-site login. |
| Wrong expiry after saving | Both explicit dates override purchased days. Clear expiration when you want days to calculate a new expiry. |
| All issues / Bugs | Please report all issues on GitHub. |
14. Deployment checklists
Customer-site checklist
- Parent package installed successfully.
- System and installer-key plugins enabled.
- Session rules reviewed.
- Subscription records and group mode tested with a non-administrator.
- Countdown module published where required.
- Customer update key saved in the installer plugin.