CP wit a password of the day

  • Hello,

    has anyone from the community build a captive Portal authentication method with Password of the day ? I would like to implement a solution with a list of Password for next 90 or 120 days with individual Passwords for each day.

    Has any had the same idea and found a good solution?

    Thanks & Kind regards


  • Yes, I did something similar, customer wanted a quarterly password.

    I simply created four users, q1, q2, q3 & q4

    Then on the portal page, a little php to work out the quarter number, username field is then a hidden field.

    It'll take you a while to add a user for each day though!

  • Just to expand on the answer a little more, now that I'm on my laptop and not my phone -

    $user_array = array ( 	1  => 'q1',
    							2  => 'q2',
    							3  => 'q3',
    							4  => 'q4'
    function CurrentQuarter(){
         $n = date('n');
         if($n < 4){
              return "1";
         } elseif($n > 3 && $n <7){
              return "2";
         } elseif($n >6 && $n < 10){
              return "3";
         } elseif($n >9){
              return "4";
    $current_user = $user_array[CurrentQuarter()];

    Then as the "User" field, I did -

  • We've done something similar using RADIUS and a custom CP page.

    • cron creates a username and password
    • cron emails that username and password to a distribution list (could also use digital signage)
    • cron deletes the previous days password

Log in to reply