Changeset 732
- Timestamp:
- 09/10/05 15:11:08 (8 years ago)
- Location:
- trunk/wifidog-auth
- Files:
-
- 2 modified
-
ChangeLog (modified) (1 diff)
-
wifidog/signup.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog-auth/ChangeLog
r731 r732 1 2005-09-10 Philippe April <philippe@ilesansfil.org> 2 * signup.php: Fixed bug in detecting is the user is already part of the 3 network. 4 1 5 2005-09-10 Francois Proulx <francois.proulx@gmail.com> 2 6 * Automatically redirect user to login form when trying to access admin -
trunk/wifidog-auth/wifidog/signup.php
r717 r732 81 81 $smarty->assign('username', $username); 82 82 $smarty->assign('email', $email); 83 $ account_origin = Network::getObject($_REQUEST['auth_source'])->getId();83 $network = Network::getObject($_REQUEST['auth_source']); 84 84 try 85 85 { 86 if (!isset($ account_origin))86 if (!isset($network)) 87 87 throw new Exception(_("Sorry, this network does not exist !")); 88 88 … … 91 91 validate_passwords($password, $password_again); 92 92 93 if (User :: getUserByUsernameAndOrigin($username, $ account_origin))93 if (User :: getUserByUsernameAndOrigin($username, $network)) 94 94 throw new Exception(_("Sorry, a user account is already associated to this username. Pick another one.")); 95 95 96 if (User :: getUserByEmailAndOrigin($email, $ account_origin))96 if (User :: getUserByEmailAndOrigin($email, $network)) 97 97 throw new Exception(_("Sorry, a user account is already associated to this email address.")); 98 98 99 $created_user = User :: createUser(get_guid(), $username, $ account_origin, $email, $password);99 $created_user = User :: createUser(get_guid(), $username, $network, $email, $password); 100 100 $created_user->sendValidationEmail(); 101 101 … … 108 108 { 109 109 // Authenticate this new user automatically 110 $network = Network::getObject($account_origin);111 110 $authenticated_user = $network->getAuthenticator()->login($username, $password, $errmsg); 112 111
