Ignore:
Timestamp:
07/30/08 18:35:15 (4 years ago)
Author:
hverton
Message:

updated preliminary support for multiple authentication methods. Made it more modulair and flexible, so other methods can be added. Also the login panel is more user friendly now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/user_info_panel/user_info_panel.php

    r1558 r1559  
    6969$variables['login_expiry']  = (iADMIN && isset($_SESSION['login_expire'])) ? time_system2local($_SESSION['login_expire']) : ""; 
    7070 
    71 // check which authentication to show 
    72 $auth_methods = explode(",",$settings['auth_type'].","); 
    73 switch($auth_methods[0]) { 
    74     case "local": 
    75     case "ldap": 
    76     case "ad": 
    77         $variables['auth_userpass'] = 1; 
    78         break; 
    79     default: 
    80         $variables['auth_userpass'] = 0; 
    81 } 
    82 switch($auth_methods[0]) { 
    83     case "openid": 
    84         $variables['auth_openid'] = 1; 
    85         break; 
    86     default: 
    87         $variables['auth_openid'] = 0; 
    88 } 
    89 switch($auth_methods[1]) { 
    90     case "local": 
    91         $variables['auth_userpass'] = 1; 
    92         break; 
    93     default: 
    94         break; 
     71// get which authentication to show 
     72$variables['auth_methods'] = explode(",",$settings['auth_type']); 
     73$variables['method_count'] = count($variables['auth_methods']); 
     74$variables['auth_state'] = array(); 
     75foreach($variables['auth_methods'] as $key => $method) { 
     76    $variables['auth_state'][] = isset($_SESSION['box_login'.$key]) && $_SESSION['box_login'.$key] == 0; 
    9577} 
    9678 
Note: See TracChangeset for help on using the changeset viewer.