Changeset 732

Show
Ignore:
Timestamp:
09/10/05 15:11:08 (8 years ago)
Author:
aprilp
Message:

* signup.php: Fixed bug in detecting is the user is already part of the network.

Location:
trunk/wifidog-auth
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/ChangeLog

    r731 r732  
     12005-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 
    152005-09-10 Francois Proulx <francois.proulx@gmail.com> 
    26        * Automatically redirect user to login form when trying to access admin 
  • trunk/wifidog-auth/wifidog/signup.php

    r717 r732  
    8181        $smarty->assign('username', $username); 
    8282        $smarty->assign('email', $email); 
    83     $account_origin = Network::getObject($_REQUEST['auth_source'])->getId(); 
     83    $network = Network::getObject($_REQUEST['auth_source']); 
    8484        try 
    8585        { 
    86                 if (!isset($account_origin)) 
     86                if (!isset($network)) 
    8787                        throw new Exception(_("Sorry, this network does not exist !")); 
    8888 
     
    9191                validate_passwords($password, $password_again); 
    9292 
    93                 if (User :: getUserByUsernameAndOrigin($username, $account_origin)) 
     93                if (User :: getUserByUsernameAndOrigin($username, $network)) 
    9494                        throw new Exception(_("Sorry, a user account is already associated to this username. Pick another one.")); 
    9595 
    96                 if (User :: getUserByEmailAndOrigin($email, $account_origin)) 
     96                if (User :: getUserByEmailAndOrigin($email, $network)) 
    9797                        throw new Exception(_("Sorry, a user account is already associated to this email address.")); 
    9898 
    99                 $created_user = User :: createUser(get_guid(), $username, $account_origin, $email, $password); 
     99                $created_user = User :: createUser(get_guid(), $username, $network, $email, $password); 
    100100                $created_user->sendValidationEmail(); 
    101101                 
     
    108108                { 
    109109                        // Authenticate this new user automatically 
    110                 $network = Network::getObject($account_origin); 
    111110                $authenticated_user = $network->getAuthenticator()->login($username, $password, $errmsg); 
    112111