Changeset 176

Show
Ignore:
Timestamp:
12/25/06 23:07:07 (2 years ago)
Author:
syrus
Message:

signup ameliore

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wifidog/wifidog-auth/wifidog/classes/User.php

    r168 r176  
    215215     * @return the newly created User object, or null if there was an error 
    216216     */ 
    217     static function createUser($id, $username, Network $account_origin, $email, $password, $realname, $birthday, $address, $postalcode, $city, $country, $phone
     217    static function createUser($id, $username, Network $account_origin, $email, $password, $realname, $birthday, $address, $postalcode, $city, $country, $phone, $network
    218218    { 
    219219        global $db; 
     
    231231                $city_str = $db->escapeString($city); 
    232232                $country_str = $db->escapeString($country); 
    233                 $phone_str = $db->escapeString($phone); 
    234                  
     233                $phone_str = $db->escapeString($phone);          
    235234 
    236235        $password_hash = $db->escapeString(User :: passwordHash($password)); 
     
    238237        $token = User :: generateToken(); 
    239238 
    240         $db->execSqlUpdate("INSERT INTO users (user_id,username, account_origin,email,pass,account_status,validation_token,reg_date,real_name,birthday,address,postalcode,city,country,phone) VALUES ('$id_str','$username_str','$account_origin_str','$email_str','$password_hash','$status','$token',NOW(),'$realname_str','$birthday_str','$address_str','$postalcode_str','$city_str','$country_str','$phone_str')"); 
     239        $db->execSqlUpdate("INSERT INTO users (user_id,username, account_origin,email,pass,account_status,validation_token,reg_date,real_name,birthday,address,postalcode,city,country,phone,network) VALUES ('$id_str','$username_str','$account_origin_str','$email_str','$password_hash','$status','$token',NOW(),'$realname_str','$birthday_str','$address_str','$postalcode_str','$city_str','$country_str','$phone_str','$network')"); 
    241240 
    242241        $object = new self($id); 
     
    254253    /** @param $object_id The id of the user */ 
    255254    function __construct($object_id) 
    256     { 
     255    {           
    257256        global $db; 
    258257        $this->mDb = & $db; 
     
    878877                 
    879878                // realname to code 
     879        $realname = "user_".$this->getId()."_realname"; 
     880        $this->setRealname($_REQUEST[$realname]); 
     881 
     882 
    880883 
    881884 }