Changeset 1445 for branches/newtoken/wifidog/login/index.php
- Timestamp:
- 02/04/10 16:20:28 (2 years ago)
- Files:
-
- 1 modified
-
branches/newtoken/wifidog/login/index.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/newtoken/wifidog/login/index.php
r1435 r1445 77 77 require_once('classes/User.php'); 78 78 require_once('classes/Network.php'); 79 require_once('classes/Token.php'); 80 require_once('classes/TokenTemplate.php'); 79 81 require_once('classes/Authenticator.php'); 80 82 require_once('classes/MainUI.php'); … … 181 183 */ 182 184 185 $templates = array(); 186 if ($network != null) { 187 188 } 189 183 190 /* 184 191 * If this is a splash-only node, skip the login interface and log-in using … … 189 196 // Login from a gateway, redirect to the gateway to activate the token 190 197 $user = $network->getSplashOnlyUser(); 191 $token = $user->generateConnectionToken($mac); 198 //$token = $user->generateConnectionToken($mac); 199 $token = Token::generateConnectionToken($mac, $network, $user); 192 200 User::setCurrentUser($user); 193 201 header("Location: http://" . $gw_address . ":" . $gw_port . "/wifidog/auth?token=" . $token); … … 213 221 if (!empty($gw_address) && !empty($gw_port)) { 214 222 // Login from a gateway, redirect to the gateway to activate the token 215 $token = $user->generateConnectionToken($mac); 223 // $token = $user->generateConnectionToken($mac); 224 $token = Token::generateConnectionToken($mac, $network, $user); 216 225 if(!$token) 217 226 {
