Minor improvements (#882)

* Minor improvements

* Updated

* Updated

* Updated

* Update privmsg.php

* Updated

* Update admin_attach_cp.php
This commit is contained in:
Roman Kelesidis 2023-09-04 01:01:01 +07:00 committed by GitHub
commit 4b453de64a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
75 changed files with 699 additions and 735 deletions

View file

@ -30,7 +30,7 @@ if (isset($_POST['submit'])) {
if (!$row['user_active']) {
bb_die($lang['NO_SEND_ACCOUNT_INACTIVE']);
}
if (in_array($row['user_level'], array(MOD, ADMIN))) {
if (in_array($row['user_level'], [MOD, ADMIN])) {
bb_die($lang['NO_SEND_ACCOUNT']);
}
@ -54,12 +54,12 @@ if (isset($_POST['submit'])) {
$emailer->set_subject($lang['EMAILER_SUBJECT']['USER_ACTIVATE_PASSWD']);
$emailer->set_template('user_activate_passwd', $row['user_lang']);
$emailer->assign_vars(array(
$emailer->assign_vars([
'SITENAME' => $bb_cfg['sitename'],
'USERNAME' => $username,
'PASSWORD' => $user_password,
'U_ACTIVATE' => make_url('profile.php?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)
));
]);
$emailer->send();
@ -74,12 +74,12 @@ if (isset($_POST['submit'])) {
$email = $username = '';
}
$template->assign_vars(array(
$template->assign_vars([
'USERNAME' => $username,
'EMAIL' => $email,
'CAPTCHA_HTML' => ($need_captcha) ? bb_captcha('get') : '',
'S_HIDDEN_FIELDS' => '',
'S_PROFILE_ACTION' => "profile.php?mode=sendpassword",
));
'S_PROFILE_ACTION' => 'profile.php?mode=sendpassword'
]);
print_page('usercp_sendpasswd.tpl');