Show
Ignore:
Timestamp:
09/02/05 03:16:02 (8 years ago)
Author:
benoitg
Message:

2005-09-01 Benoit Gr�goire <bock@…>

WARNING: DO NOT use the CVS auth server in production until further notice.
Massive internal changes are underway.
Use the release tagged 1.0m1 in production.

  • Network abstraction mostly complete, including UI. All that is missing is new network creation, network stakeholder UI and testing.
  • Cleanup the config file of all the now unneeded constants. Note that the install script is currently broken. There can now be multiple networks on the server. The install script will have to make sure that there is at least one, with one super-admin
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/wifidog/change_password.php

    r579 r708  
    2626define('BASEPATH','./'); 
    2727require_once BASEPATH.'include/common.php'; 
     28require_once BASEPATH.'classes/MainUI.php'; 
    2829require_once BASEPATH.'include/common_interface.php'; 
    2930require_once BASEPATH.'classes/User.php'; 
    30 require_once BASEPATH.'classes/MainUI.php'; 
    3131 
    3232isset($_REQUEST["username"]) && $smarty->assign("username", $_REQUEST["username"]); 
     
    3434if (isset($_REQUEST["submit"])) { 
    3535    try { 
    36         // If the source is present and that it's in our AUTH_SOURCE_ARRAY, save it to a var for later use 
    37                 $_REQUEST['auth_source'] && in_array($_REQUEST['auth_source'], array_keys($AUTH_SOURCE_ARRAY)) && $account_origin = $_REQUEST['auth_source']; 
     36        // If the source is present and that it's in our, save it to a var for later use 
     37                $account_origin = Networt::getObject($_REQUEST['auth_source']); 
    3838                 
    3939        if (!$account_origin || !$_REQUEST["username"] || !$_REQUEST["oldpassword"] || !$_REQUEST["newpassword"] || !$_REQUEST["newpassword_again"]) 
     
    7373$sources = array (); 
    7474// Preserve keys 
    75 foreach (array_keys($AUTH_SOURCE_ARRAY) as $auth_source_key) 
    76         if ($AUTH_SOURCE_ARRAY[$auth_source_key]['authenticator']->isRegistrationPermitted()) 
    77                 $sources[$auth_source_key] = $AUTH_SOURCE_ARRAY[$auth_source_key]; 
     75$network_array=Network::getAllNetworks(); 
     76foreach ($network_array as $network) 
     77        if ($network->getAuthenticator()->isRegistrationPermitted()) 
     78                $sources[$network->getId()] = $network->getName(); 
    7879                 
    7980isset ($sources) && $smarty->assign('auth_sources', $sources);