changeset 1148 | dcf6e9394e02 |
parent 1132 | 05fe0039d952 |
child 1155 | a1770361ef88 |
1147:7ddd475bc661 | 1148:dcf6e9394e02 |
---|---|
1969 |
1969 |
1970 // Generate a totally random activation key |
1970 // Generate a totally random activation key |
1971 $actkey = sha1 ( microtime() . mt_rand() ); |
1971 $actkey = sha1 ( microtime() . mt_rand() ); |
1972 |
1972 |
1973 // We good, create the user |
1973 // We good, create the user |
1974 $this->sql('INSERT INTO '.table_prefix.'users ( username, email, real_name, theme, style, reg_time, account_active, activation_key, user_level, user_coppa, user_registration_ip ) VALUES ( \''.$username.'\', \''.$email.'\', \''.$real_name.'\', \''.$template->default_theme.'\', \''.$template->default_style.'\', '.time().', '.$active.', \''.$actkey.'\', '.USER_LEVEL_CHPREF.', ' . $coppa_col . ', \'' . $ip . '\' );'); |
1974 $this->sql('INSERT INTO ' . table_prefix . "users ( username, email, real_name, theme, style, reg_time, account_active, activation_key, user_level, user_coppa,\n" |
1975 . " user_registration_ip, user_lang, user_has_avatar, avatar_type ) VALUES\n" |
|
1976 . " ( '$username', '$email', '$real_name', '$template->default_theme', '$template->default_style', " . time() . ", $active, '$actkey', \n" |
|
1977 . " " . USER_LEVEL_CHPREF . ", $coppa_col, '$ip', $lang->lang_id, 0, 'png' );"); |
|
1975 |
1978 |
1976 // Get user ID and create users_extra entry |
1979 // Get user ID and create users_extra entry |
1977 $q = $this->sql('SELECT user_id FROM '.table_prefix."users WHERE username='$username';"); |
1980 $q = $this->sql('SELECT user_id FROM '.table_prefix."users WHERE username='$username';"); |
1978 if ( $db->numrows() > 0 ) |
1981 if ( $db->numrows() > 0 ) |
1979 { |
1982 { |