Gå til innhold

Får feilmelding: usercp_register.php on line 525


Anbefalte innlegg

Har et forum der jeg nå ikke får til å forandre avatar, profilnavn og forandre signatur.

Har ikke så veldig god greie på php så håper noen kan kikke på dette:

 

 

Dette står i linje 525:

require($phpbb_root_path . 'g2helper.inc');

 

I skjult ifra linje 504 til 615. Håper noen kan hjelpe

Klikk for å se/fjerne innholdet nedenfor

{

if ( $email != $userdata['user_email'] && $board_config['require_activation'] != USER_ACTIVATION_NONE && $userdata['user_level'] != ADMIN )

{

$user_active = 0;

 

$user_actkey = gen_rand_string(true);

$key_len = 54 - ( strlen($server_url) );

$key_len = ( $key_len > 6 ) ? $key_len : 6;

$user_actkey = substr($user_actkey, 0, $key_len);

 

if ( $userdata['session_logged_in'] )

{

session_end($userdata['session_id'], $userdata['user_id']);

}

}

else

{

$user_active = 1;

$user_actkey = '';

}

// Update user in gallery

require($phpbb_root_path . 'g2helper.inc');

$g2h = new g2helper($db);

$g2h->updateUser($user_id, $username, $password, $email);

 

$sql = "UPDATE " . USERS_TABLE . "

SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popup_pm, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_active = $user_active, user_actkey = '" . str_replace("\'", "''", $user_actkey) . "'" . $avatar_sql . "

WHERE user_id = $user_id";

if ( !($result = $db->sql_query($sql)) )

{

message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql);

}

 

// We remove all stored login keys since the password has been updated

// and change the current one (if applicable)

if ( !empty($passwd_sql) )

{

session_reset_keys($user_id, $user_ip);

}

 

if ( !$user_active )

{

//

// The users account has been deactivated, send them an email with a new activation key

//

include($phpbb_root_path . 'includes/emailer.'.$phpEx);

$emailer = new emailer($board_config['smtp_delivery']);

 

if ( $board_config['require_activation'] != USER_ACTIVATION_ADMIN )

{

$emailer->from($board_config['board_email']);

$emailer->replyto($board_config['board_email']);

 

$emailer->use_template('user_activate', stripslashes($user_lang));

$emailer->email_address($email);

$emailer->set_subject($lang['Reactivate']);

 

$emailer->assign_vars(array(

'SITENAME' => $board_config['sitename'],

'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)),

'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '',

 

'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)

);

$emailer->send();

$emailer->reset();

}

else if ( $board_config['require_activation'] == USER_ACTIVATION_ADMIN )

{

$sql = 'SELECT user_email, user_lang

FROM ' . USERS_TABLE . '

WHERE user_level = ' . ADMIN;

 

if ( !($result = $db->sql_query($sql)) )

{

message_die(GENERAL_ERROR, 'Could not select Administrators', '', __LINE__, __FILE__, $sql);

}

 

while ($row = $db->sql_fetchrow($result))

{

$emailer->from($board_config['board_email']);

$emailer->replyto($board_config['board_email']);

 

$emailer->email_address(trim($row['user_email']));

$emailer->use_template("admin_activate", $row['user_lang']);

$emailer->set_subject($lang['Reactivate']);

 

$emailer->assign_vars(array(

'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)),

'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),

 

'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)

);

$emailer->send();

$emailer->reset();

}

$db->sql_freeresult($result);

}

 

$message = $lang['Profile_updated_inactive'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');

}

else

{

$message = $lang['Profile_updated'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');

}

 

$template->assign_vars(array(

"META" => '<meta http-equiv="refresh" content="5;url=' . append_sid("index.$phpEx") . '">')

);

 

message_die(GENERAL_MESSAGE, $message);

}

Lenke til kommentar
Videoannonse
Annonse

Opprett en konto eller logg inn for å kommentere

Du må være et medlem for å kunne skrive en kommentar

Opprett konto

Det er enkelt å melde seg inn for å starte en ny konto!

Start en konto

Logg inn

Har du allerede en konto? Logg inn her.

Logg inn nå
×
×
  • Opprett ny...