Ignore:
Timestamp:
07/30/08 16:04:17 (4 years ago)
Author:
hverton
Message:

added preliminary support for multiple authentication methods. Currently, local database and OpenID are supported

File:
1 edited

Legend:

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

    r1542 r1558  
    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'].","); 
     73switch($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} 
     82switch($auth_methods[0]) { 
     83    case "openid": 
     84        $variables['auth_openid'] = 1; 
     85        break; 
     86    default: 
     87        $variables['auth_openid'] = 0; 
     88} 
     89switch($auth_methods[1]) { 
     90    case "local": 
     91        $variables['auth_userpass'] = 1; 
     92        break; 
     93    default: 
     94        break; 
     95} 
     96 
     97// check if we need to display links 
     98$variables['show_reglink'] = $settings['enable_registration']; 
     99$variables['show_passlink'] = 1; 
     100 
    71101$template_variables['modules.user_info_panel'] = $variables; 
    72102?> 
Note: See TracChangeset for help on using the changeset viewer.