Time-Based Guest Registration




As per the flow chart above, customer has one guest SSID broadcasted. There is one service to handle the Guest request. He  wants to tweak the configuration that different Captive Portal pages to be displayed to users based on Time-Of-Day.

Mac authentication is blocked on his network.


Note: This is an advanced custom requirement article and explanation of setting up basic Sponsor approval login and social login is beyond the scope of this article.


We can get this working in the below way.





We add a new page (name it as landing-page). We map this page to the Captive Portal profile on the NAD device ( controllers). All the guest users will first hit this page.

We will add a Php code to capture the tim of day ( server's time) and the take the redirect decision.

Guest users will automatically get redirected to the page configured. User experience will not get affected as they will not wait on the landing page.



1: Add a new Sponsor approval self registration page.

2: Add a new Captive Portal page to allow guests via Social login

3: Add a new landing page.

Write the below code in the header section of the page.



{assign var=hour value=$smarty.now|date_format:"%k%M"}
{assign var=day value=$smarty.now|date_format:"%u"}

{if $day < 6 && $hour > 0800 && $hour < 1800}
<meta http-equiv="refresh" content="0;url=https://campusacp01.arubaps-lab1.com/guest/guest_register.php"/>

<meta http-equiv="refresh" content="0;url=https://campusacp01.arubaps-lab1.com/guest/social.php?mac={$mac}"/>


This code will check the time between 8 AM to 6 PM  and day is less than 6 ( 6 = Saturday, 1 = Monday) and redirect the users to sponsor approval page. In all other cases guest will be redirected to Social login page.


Here "https://campusacp01.arubaps-lab1.com/guest/guest_register.php" is guest self registration page with sponsor approval while "https://campusacp01.arubaps-lab1.com/guest/social.php" is the Social login page.


Now, bring up a guest device and try to associate with the Guest SSID.

Note: The redirection happens based on on Server time and not the device's browser time. So if the time on device is wrong, the functionality will not change.

Version history
Revision #:
2 of 2
Last update:
‎08-31-2015 02:18 AM
Updated by:
Labels (1)
Search Airheads
Showing results for 
Search instead for 
Did you mean: