Topic: pun_admin_add_user user password
if $forum_config['o_regs_verify'] == '0', how to know password? imho, better to do so:
$errors = add_user(
array(
'username' => $username,
'group_id' => $forum_config['o_default_user_group'], //($forum_config['o_regs_verify'] == '0') ? $forum_config['o_default_user_group'] : FORUM_UNVERIFIED, // Ruzzz
'salt' => $salt,
'password' => $password,
'password_hash' => $password_hash,
'email' => $email,
'email_setting' => 1,
'save_pass' => 0,
'timezone' => $forum_config['o_default_timezone'],
'dst' => 0,
'language' => $forum_config['o_default_lang'],
'style' => $forum_config['o_default_style'],
'registered' => time(),
'registration_ip' => get_remote_address(),
'activate_key' => 'NULL', //($forum_config['o_regs_verify'] == '1') ? '\''.random_key(8, true).'\'' : 'NULL', // Ruzzz
'require_verification' => false, //($forum_config['o_regs_verify'] == '1'), // Ruzzz
'notify_admins' => ($forum_config['o_regs_report'] == '1')
),
$new_uid
);
//Ruzzz
// Load the "welcome" template
$mail_tpl = forum_trim(file_get_contents($ext_info['path'].'/lang/'.$forum_user['language'].'/mail_templates/welcome.tpl'));
// The first row contains the subject
$first_crlf = strpos($mail_tpl, "\n");
$mail_subject = forum_trim(substr($mail_tpl, 8, $first_crlf-8));
$mail_message = forum_trim(substr($mail_tpl, $first_crlf));
$mail_subject = str_replace('<board_title>', $forum_config['o_board_title'], $mail_subject);
$mail_message = str_replace('<base_url>', $base_url.'/', $mail_message);
$mail_message = str_replace('<username>', $username, $mail_message);
$mail_message = str_replace('<password>',$password, $mail_message);
$mail_message = str_replace('<board_mailer>', sprintf($lang_common['Forum mailer'], $forum_config['o_board_title']), $mail_message);
forum_mail($email, $mail_subject, $mail_message);
// Ruzzz
but send the password to the user.
template:
Subject: Welcome to <board_title>!
Administrator created an account for you at the forum <base_url>.
Your account information:
Username: <username>
Password: <password>
It is strongly recommended to change your password!
--
<board_mailer>
(Do not reply to this message)
russian
Subject: Добро пожаловать на <board_title>!
Администратор создал аккуант для вас на форуме <base_url>.
Информация о вашем аккуанте:
Логин: <username>
Пароль: <password>
Настоятельно рекомендуется сменить пароль!
--
<board_mailer>
(Не отвечайте на это сообщение)