1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-13 12:35:06 +01:00

A reworking of how we handle inactive users

git-svn-id: file:///svn/phpbb/trunk@6394 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Graham Eames 2006-09-23 12:27:51 +00:00
parent 36fa521f92
commit cbece78f7b
15 changed files with 433 additions and 171 deletions

View File

@ -0,0 +1,75 @@
<!-- INCLUDE overall_header.html -->
<a name="maincontent"></a>
<h2>{L_INACTIVE_USERS}</h2>
<p>{L_INACTIVE_USERS_EXPLAIN}</p>
<form id="inactive" method="post" action="{U_ACTION}">
<div class="clearfix"></div>
<div class="pagination">
<!-- IF PAGINATION -->
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
<!-- ELSE -->
{S_ON_PAGE}
<!-- ENDIF -->
</div>
<table cellspacing="1">
<thead>
<tr>
<th>{L_USERNAME}</th>
<th>{L_JOINED}</th>
<th>{L_INACTIVE_DATE}</th>
<th>{L_INACTIVE_REASON}</th>
<th>{L_LAST_VISIT}</th>
<th>{L_MARK}</th>
</tr>
</thead>
<tbody>
<!-- BEGIN inactive -->
<!-- IF inactive.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td><a href="{inactive.U_USER_ADMIN}">{inactive.USERNAME}</a></td>
<td>{inactive.JOINED}</td>
<td>{inactive.INACTIVE_DATE}</td>
<td>{inactive.REASON}</td>
<td>{inactive.LAST_VISIT}</td>
<td>&nbsp;<input type="checkbox" class="radio" name="mark[]" value="{inactive.USER_ID}" />&nbsp;</td>
</tr>
<!-- BEGINELSE -->
<tr>
<td colspan="5" style="text-align: center;">{L_NO_INACTIVE_USERS}</td>
</tr>
<!-- END inactive -->
</tbody>
</table>
<!-- IF .inactive -->
<fieldset class="quick" style="float: left;">
{L_DISPLAY_LOG}: &nbsp;{S_LIMIT_DAYS}&nbsp;{L_SORT_BY}: {S_SORT_KEY} {S_SORT_DIR}
<input class="button2" type="submit" value="{L_GO}" name="sort" />
</fieldset>
<fieldset class="quick">
<p><a href="#" onclick="marklist('inactive', 'mark', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('inactive', 'mark', false); return false;">{L_UNMARK_ALL}</a></p>
<select name="action">{S_INACTIVE_OPTIONS}</select>
<input class="button2" type="submit" name="submit" value="{L_SUBMIT}" />
</fieldset>
<!-- ENDIF -->
<div class="pagination">
<!-- IF PAGINATION -->
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
<!-- ELSE -->
{S_ON_PAGE}
<!-- ENDIF -->
</div>
</form>
<!-- INCLUDE overall_footer.html -->

View File

@ -133,17 +133,18 @@
<!-- IF S_INACTIVE_USERS -->
<h2>{L_INACTIVE_USERS}</h2>
<p>{L_INACTIVE_USERS_EXPLAIN}</p>
<p>{L_INACTIVE_USERS_EXPLAIN_INDEX}</p>
<form id="inactive" method="post" action="{U_ACTION}">
<div style="text-align: right;"><a href="{U_INACTIVE_USERS}">&raquo; {L_VIEW_INACTIVE_USERS}</a></div>
<table cellspacing="1">
<thead>
<tr>
<th>{L_USERNAME}</th>
<th>{L_JOINED}</th>
<th>{L_INACTIVE_DATE}</th>
<th>{L_INACTIVE_REASON}</th>
<th>{L_LAST_VISIT}</th>
<th>{L_MARK}</th>
</tr>
</thead>
<tbody>
@ -151,29 +152,19 @@
<!-- IF inactive.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td><a href="{inactive.U_USER_ADMIN}">{inactive.USERNAME}</a></td>
<td>{inactive.DATE}</td>
<td>{inactive.JOINED}</td>
<td>{inactive.INACTIVE_DATE}</td>
<td>{inactive.REASON}</td>
<td>{inactive.LAST_VISIT}</td>
<td>&nbsp;<input type="checkbox" class="radio" name="mark[]" value="{inactive.USER_ID}" />&nbsp;</td>
</tr>
<!-- BEGINELSE -->
<tr>
<td colspan="3" style="text-align: center;">{L_NO_INACTIVE_USERS}</td>
<td colspan="4" style="text-align: center;">{L_NO_INACTIVE_USERS}</td>
</tr>
<!-- END inactive -->
</tbody>
</table>
<!-- IF .inactive -->
<fieldset class="quick">
<p><a href="#" onclick="marklist('inactive', 'mark', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('inactive', 'mark', false); return false;">{L_UNMARK_ALL}</a></p>
<select name="action">{S_INACTIVE_OPTIONS}</select>
<input class="button2" type="submit" name="submit" value="{L_SUBMIT}" />
</fieldset>
<!-- ENDIF -->
</form>
<!-- ENDIF -->
<!-- ENDIF -->

View File

@ -0,0 +1,195 @@
<?php
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2006 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @package acp
*/
class acp_inactive
{
var $u_action;
var $p_master;
function acp_inactive(&$p_master)
{
$this->p_master = &$p_master;
}
function main($id, $mode)
{
global $config, $db, $user, $auth, $template;
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
$action = request_var('action', '');
$mark = (isset($_REQUEST['mark'])) ? request_var('mark', array(0)) : array();
$start = request_var('start', 0);
// Sort keys
$sort_days = request_var('st', 0);
$sort_key = request_var('sk', 'i');
$sort_dir = request_var('sd', 'd');
if (sizeof($mark))
{
switch ($action)
{
case 'activate':
case 'delete':
$sql = 'SELECT username
FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('user_id', $mark);
$result = $db->sql_query($sql);
$user_affected = array();
while ($row = $db->sql_fetchrow($result))
{
$user_affected[] = $row['username'];
}
$db->sql_freeresult($result);
if ($action == 'activate')
{
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
foreach ($mark as $user_id)
{
user_active_flip($user_id, USER_INACTIVE);
}
set_config('num_users', $config['num_users'] + sizeof($mark), true);
// Update latest username
update_last_username();
}
else if ($action == 'delete')
{
if (!$auth->acl_get('a_userdel'))
{
trigger_error($user->lang['NO_ADMIN'], E_USER_WARNING);
}
$sql = 'DELETE FROM ' . USER_GROUP_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $mark);
$db->sql_query($sql);
$sql = 'DELETE FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $mark);
$db->sql_query($sql);
add_log('admin', 'LOG_INACTIVE_' . strtoupper($action), implode(', ', $user_affected));
}
break;
case 'remind':
if (empty($config['email_enable']))
{
trigger_error($user->lang['EMAIL_DISABLED'], E_USER_WARNING);
}
$sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type, user_regdate, user_actkey
FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('user_id', $mark);
$result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result))
{
// Send the messages
include_once($phpbb_root_path . 'includes/functions_messenger.'.$phpEx);
$messenger = new messenger();
$board_url = generate_board_url() . "/ucp.$phpEx?mode=activate";
$sig = str_replace('<br />', "\n", "-- \n" . $config['board_email_sig']);
$usernames = array();
do
{
$messenger->template('user_remind_inactive', $row['user_lang']);
$messenger->replyto($config['board_email']);
$messenger->to($row['user_email'], $row['username']);
$messenger->im($row['user_jabber'], $row['username']);
$messenger->assign_vars(array(
'EMAIL_SIG' => $sig,
'USERNAME' => html_entity_decode($row['username']),
'SITENAME' => $config['sitename'],
'REGISTER_DATE' => $user->format_date($row['user_regdate']),
'U_ACTIVATE' => "$board_url&mode=activate&u=" . $row['user_id'] . '&k=' . $row['user_actkey'])
);
$messenger->send($row['user_notify_type']);
$usernames[] = $row['username'];
}
while ($row = $db->sql_fetchrow($result));
$messenger->save_queue();
add_log('admin', 'LOG_INACTIVE_REMIND', implode(', ', $usernames));
unset($usernames);
}
$db->sql_freeresult($result);
break;
}
}
// Sorting
$limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
$sort_by_text = array('i' => $user->lang['SORT_INACTIVE'], 'j' => $user->lang['SORT_REG_DATE'], 'l' => $user->lang['SORT_LAST_VISIT'], 'r' => $user->lang['SORT_REASON'], 'u' => $user->lang['SORT_USERNAME']);
$sort_by_sql = array('i' => 'user_inactive_time', 'j' => 'user_regdate', 'l' => 'user_lastvisit', 'r' => 'user_inactive_reason', 'u' => 'username');
$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
// Define where and sort sql for use in displaying logs
$sql_where = ($sort_days) ? (time() - ($sort_days * 86400)) : 0;
$sql_sort = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
$inactive = array();
$inactive_count = 0;
view_inactive_users($inactive, $inactive_count, $config['topics_per_page'], $start, $sql_where, $sql_sort);
foreach ($inactive as $row)
{
$template->assign_block_vars('inactive', array(
'INACTIVE_DATE' => $user->format_date($row['user_inactive_time']),
'JOINED' => $user->format_date($row['user_regdate']),
'LAST_VISIT' => (!$row['user_lastvisit']) ? ' - ' : $user->format_date($row['user_lastvisit']),
'REASON' => $row['inactive_reason'],
'USER_ID' => $row['user_id'],
'USERNAME' => $row['username'],
'U_USER_ADMIN' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&amp;mode=overview&amp;u={$row['user_id']}"))
);
}
$option_ary = array('activate' => 'ACTIVATE', 'delete' => 'DELETE');
if ($config['email_enable'])
{
$option_ary += array('remind' => 'REMIND');
}
$template->assign_vars(array(
'S_INACTIVE_USERS' => true,
'S_INACTIVE_OPTIONS' => build_select($option_ary),
'S_LIMIT_DAYS' => $s_limit_days,
'S_SORT_KEY' => $s_sort_key,
'S_SORT_DIR' => $s_sort_dir,
'S_ON_PAGE' => on_page($inactive_count, $config['topics_per_page'], $start),
'PAGINATION' => generate_pagination($this->u_action . "&amp;$u_sort_param", $inactive_count, $config['topics_per_page'], $start, true),
));
$this->tpl_name = 'acp_inactive';
$this->page_title = 'ACP_INACTIVE_USERS';
}
}
?>

View File

@ -50,123 +50,6 @@ class acp_main
}
$action = request_var('action', '');
$mark = (isset($_REQUEST['mark'])) ? request_var('mark', array(0)) : array();
if (sizeof($mark))
{
switch ($action)
{
case 'activate':
case 'delete':
if (!$auth->acl_get('a_user'))
{
trigger_error($user->lang['NO_ADMIN'], E_USER_WARNING);
}
$sql = 'SELECT username
FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('user_id', $mark);
$result = $db->sql_query($sql);
$user_affected = array();
while ($row = $db->sql_fetchrow($result))
{
$user_affected[] = $row['username'];
}
$db->sql_freeresult($result);
if ($action == 'activate')
{
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
foreach ($mark as $user_id)
{
user_active_flip($user_id, USER_INACTIVE);
}
set_config('num_users', $config['num_users'] + sizeof($mark), true);
// Update latest username
update_last_username();
}
else if ($action == 'delete')
{
if (!$auth->acl_get('a_userdel'))
{
trigger_error($user->lang['NO_ADMIN'], E_USER_WARNING);
}
$sql = 'DELETE FROM ' . USER_GROUP_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $mark);
$db->sql_query($sql);
$sql = 'DELETE FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $mark);
$db->sql_query($sql);
add_log('admin', 'LOG_INDEX_' . strtoupper($action), implode(', ', $user_affected));
}
break;
case 'remind':
if (!$auth->acl_get('a_user'))
{
trigger_error($user->lang['NO_ADMIN'], E_USER_WARNING);
}
if (empty($config['email_enable']))
{
trigger_error($user->lang['EMAIL_DISABLED'], E_USER_WARNING);
}
$sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type, user_regdate, user_actkey
FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('user_id', $mark);
$result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result))
{
// Send the messages
include_once($phpbb_root_path . 'includes/functions_messenger.'.$phpEx);
$messenger = new messenger();
$board_url = generate_board_url() . "/ucp.$phpEx?mode=activate";
$sig = str_replace('<br />', "\n", "-- \n" . $config['board_email_sig']);
$usernames = array();
do
{
$messenger->template('user_remind_inactive', $row['user_lang']);
$messenger->replyto($config['board_email']);
$messenger->to($row['user_email'], $row['username']);
$messenger->im($row['user_jabber'], $row['username']);
$messenger->assign_vars(array(
'EMAIL_SIG' => $sig,
'USERNAME' => html_entity_decode($row['username']),
'SITENAME' => $config['sitename'],
'REGISTER_DATE' => $user->format_date($row['user_regdate']),
'U_ACTIVATE' => "$board_url&mode=activate&u=" . $row['user_id'] . '&k=' . $row['user_actkey'])
);
$messenger->send($row['user_notify_type']);
$usernames[] = $row['username'];
}
while ($row = $db->sql_fetchrow($result));
$messenger->save_queue();
add_log('admin', 'LOG_INDEX_REMIND', implode(', ', $usernames));
unset($usernames);
}
$db->sql_freeresult($result);
break;
}
}
switch ($action)
{
@ -443,6 +326,7 @@ class acp_main
'U_ACTION' => append_sid("{$phpbb_admin_path}index.$phpEx"),
'U_ADMIN_LOG' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=logs&amp;mode=admin'),
'U_INACTIVE_USERS' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=inactive&amp;mode=list'),
'S_ACTION_OPTIONS' => ($auth->acl_get('a_board')) ? $s_action_options : '',
)
@ -468,17 +352,18 @@ class acp_main
if ($auth->acl_get('a_user'))
{
$sql = 'SELECT user_id, username, user_regdate, user_lastvisit
FROM ' . USERS_TABLE . '
WHERE user_type = ' . USER_INACTIVE . '
ORDER BY user_regdate ASC';
$result = $db->sql_query($sql);
$inactive = array();
$inactive_count = 0;
while ($row = $db->sql_fetchrow($result))
view_inactive_users($inactive, $inactive_count, 10);
foreach ($inactive as $row)
{
$template->assign_block_vars('inactive', array(
'DATE' => $user->format_date($row['user_regdate']),
'INACTIVE_DATE' => $user->format_date($row['user_inactive_time']),
'JOINED' => $user->format_date($row['user_regdate']),
'LAST_VISIT' => (!$row['user_lastvisit']) ? ' - ' : $user->format_date($row['user_lastvisit']),
'REASON' => $row['inactive_reason'],
'USER_ID' => $row['user_id'],
'USERNAME' => $row['username'],
'U_USER_ADMIN' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&amp;mode=overview&amp;u={$row['user_id']}"))

View File

@ -269,7 +269,7 @@ class acp_prune
{
foreach ($user_ids as $user_id)
{
user_active_flip($user_id, USER_NORMAL, false, false, true);
user_active_flip($user_id, USER_NORMAL, false, false, INACTIVE_MANUAL, true);
}
$l_log = 'LOG_PRUNE_USER_DEAC';

View File

@ -269,7 +269,7 @@ class acp_users
if ($user_row['user_type'] != USER_INACTIVE)
{
user_active_flip($user_id, $user_row['user_type'], $user_actkey, $user_row['username']);
user_active_flip($user_id, $user_row['user_type'], $user_actkey, $user_row['username'], INACTIVE_MANUAL);
}
$messenger = new messenger(false);
@ -311,7 +311,7 @@ class acp_users
trigger_error($user->lang['CANNOT_DEACTIVATE_YOURSELF'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
}
user_active_flip($user_id, $user_row['user_type'], false, $user_row['username']);
user_active_flip($user_id, $user_row['user_type'], false, $user_row['username'], INACTIVE_MANUAL);
$message = ($user_row['user_type'] == USER_INACTIVE) ? 'USER_ADMIN_ACTIVATED' : 'USER_ADMIN_DEACTIVED';
$log = ($user_row['user_type'] == USER_INACTIVE) ? 'LOG_USER_ACTIVE' : 'LOG_USER_INACTIVE';

View File

@ -0,0 +1,37 @@
<?php
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2006 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @package module_install
*/
class acp_inactive_info
{
function module()
{
return array(
'filename' => 'acp_inactive',
'title' => 'ACP_INACTIVE_USERS',
'version' => '1.0.0',
'modes' => array(
'list' => array('title' => 'ACP_INACTIVE_USERS', 'auth' => 'acl_a_user', 'cat' => array('ACP_CAT_USERS')),
),
);
}
function install()
{
}
function uninstall()
{
}
}
?>

View File

@ -30,6 +30,10 @@ define('USER_FOUNDER', 3);
//define('USER_BOT', 2);
//define('USER_GUEST', 4);
define('INACTIVE_REGISTER', 1);
define('INACTIVE_PROFILE', 2);
define('INACTIVE_MANUAL', 3);
// ACL
define('ACL_NEVER', 0);
define('ACL_YES', 1);

View File

@ -2330,6 +2330,52 @@ function update_foes()
unset($perms);
}
/**
* Lists inactive users
*/
function view_inactive_users(&$users, &$user_count, $limit = 0, $offset = 0, $limit_days = 0, $sort_by = 'user_inactive_time DESC')
{
global $db, $user;
$sql = 'SELECT user_id, username, user_regdate, user_lastvisit, user_inactive_time, user_inactive_reason
FROM ' . USERS_TABLE . '
WHERE user_type = ' . USER_INACTIVE .
(($limit_days) ? "AND user_inactive_time >= $limit_days" : '') . "
ORDER BY $sort_by";
$result = $db->sql_query_limit($sql, $limit, $offset);
while ($row = $db->sql_fetchrow($result))
{
$row['inactive_reason'] = $user->lang['INACTIVE_REASON_UNKNOWN'];
switch ($row['user_inactive_reason'])
{
case INACTIVE_REGISTER:
$row['inactive_reason'] = $user->lang['INACTIVE_REASON_REGISTER'];
break;
case INACTIVE_PROFILE:
$row['inactive_reason'] = $user->lang['INACTIVE_REASON_PROFILE'];
break;
case INACTIVE_MANUAL:
$row['inactive_reason'] = $user->lang['INACTIVE_REASON_MANUAL'];
break;
}
$users[] = $row;
}
$sql = 'SELECT count(user_id) AS user_count
FROM ' . USERS_TABLE . '
WHERE user_type = ' . USER_INACTIVE .
(($limit_days) ? "AND user_inactive_time >= $limit_days" : '');
$result = $db->sql_query($sql);
$user_count = (int) $db->sql_fetchfield('user_count');
$db->sql_freeresult($result);
return;
}
/**
* Lists warned users
*/

View File

@ -158,6 +158,8 @@ function user_add($user_row, $cp_data = false)
'user_regdate' => time(),
'user_passchg' => time(),
'user_inactive_reason' => 0,
'user_inactive_time' => 0,
'user_lastmark' => time(),
'user_lastvisit' => 0,
'user_lastpost_time' => 0,
@ -423,7 +425,7 @@ function user_delete($mode, $user_id, $post_username = false)
* Flips user_type from active to inactive and vice versa, handles
* group membership updates
*/
function user_active_flip($user_id, $user_type, $user_actkey = false, $username = false, $no_log = false)
function user_active_flip($user_id, $user_type, $user_actkey = false, $username = false, $reason = 0, $no_log = false)
{
global $db, $user, $auth;
@ -467,7 +469,9 @@ function user_active_flip($user_id, $user_type, $user_actkey = false, $username
$db->sql_query($sql);
$sql_ary = array(
'user_type' => ($user_type == USER_NORMAL) ? USER_INACTIVE : USER_NORMAL
'user_type' => ($user_type == USER_NORMAL) ? USER_INACTIVE : USER_NORMAL,
'user_inactive_time' => ($user_type == USER_NORMAL) ? time() : 0,
'user_inactive_reason' => ($user_type == USER_NORMAL) ? $reason : 0,
);
if ($user_actkey !== false)

View File

@ -70,7 +70,7 @@ class ucp_activate
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
// Now we need to demote the user from the inactive group and add him to the registered group
user_active_flip($user_row['user_id'], $user_row['user_type'], '', $user_row['username'], true);
user_active_flip($user_row['user_id'], $user_row['user_type'], '', $user_row['username'], 0, true);
// Update last username
update_last_username();

View File

@ -180,8 +180,10 @@ class ucp_profile
$messenger->save_queue();
$sql_ary += array(
'user_type' => USER_INACTIVE,
'user_actkey' => $user_actkey
'user_type' => USER_INACTIVE,
'user_actkey' => $user_actkey,
'user_inactive_reason' => INACTIVE_PROFILE,
'user_inactive_time' => time(),
);
}

View File

@ -239,24 +239,30 @@ class ucp_register
$key_len = ($key_len < 6) ? 6 : $key_len;
$user_actkey = substr($user_actkey, 0, $key_len);
$user_type = USER_INACTIVE;
$user_inactive_reason = INACTIVE_REGISTER;
$user_inactive_time = time();
}
else
{
$user_type = USER_NORMAL;
$user_actkey = '';
$user_inactive_reason = 0;
$user_inactive_time = 0;
}
$user_row = array(
'username' => $username,
'user_password' => md5($new_password),
'user_email' => $email,
'group_id' => (int) $group_id,
'user_timezone' => (float) $tz,
'user_lang' => $lang,
'user_type' => $user_type,
'user_actkey' => $user_actkey,
'user_ip' => $user->ip,
'user_regdate' => time(),
'username' => $username,
'user_password' => md5($new_password),
'user_email' => $email,
'group_id' => (int) $group_id,
'user_timezone' => (float) $tz,
'user_lang' => $lang,
'user_type' => $user_type,
'user_actkey' => $user_actkey,
'user_ip' => $user->ip,
'user_regdate' => time(),
'user_inactive_reason' => $user_inactive_reason,
'user_inactive_time' => $user_inactive_time,
);
// Register user...

View File

@ -1357,7 +1357,7 @@ class install_install extends module
$_module->move_module_by($row, 'move_up', 4);
// Move manage users screen module 4 up...
// Move manage users screen module 5 up...
$sql = 'SELECT *
FROM ' . MODULES_TABLE . "
WHERE module_basename = 'users'
@ -1367,7 +1367,7 @@ class install_install extends module
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$_module->move_module_by($row, 'move_up', 4);
$_module->move_module_by($row, 'move_up', 5);
}
// And now for the special ones
@ -1667,13 +1667,13 @@ class install_install extends module
break;
case 'oracle':
case 'sqlite':
$prefix_length = 200;
break;
case 'firebird':
case 'oracle':
$prefix_length = 6;
break;

View File

@ -98,6 +98,7 @@ $lang = array_merge($lang, array(
'ACP_ICONS' => 'Topic Icons',
'ACP_ICONS_SMILIES' => 'Topic Icons/Smilies',
'ACP_IMAGESETS' => 'Imagesets',
'ACP_INACTIVE_USERS' => 'Inactive users',
'ACP_INDEX' => 'Admin index',
'ACP_JABBER_SETTINGS' => 'Jabber Settings',
@ -303,10 +304,6 @@ $lang = array_merge($lang, array(
'GZIP_COMPRESSION' => 'Gzip compression',
'INACTIVE_USERS' => 'Inactive Users',
'INACTIVE_USERS_EXPLAIN' => 'This is a list of users who have registered but whos accounts are inactive. You can activate, delete or remind (by sending an email) these users if you wish.',
'NO_INACTIVE_USERS' => 'No inactive users',
'NOT_AVAILABLE' => 'Not available',
'NUMBER_FILES' => 'Number of attachments',
'NUMBER_POSTS' => 'Number of posts',
@ -329,12 +326,32 @@ $lang = array_merge($lang, array(
'UPLOAD_DIR_SIZE' => 'Size of posted attachments',
'USERS_PER_DAY' => 'Users per day',
'VALUE' => 'Value',
'VIEW_ADMIN_LOG' => 'View administrator log',
'VALUE' => 'Value',
'VIEW_ADMIN_LOG' => 'View administrator log',
'VIEW_INACTIVE_USERS' => 'View inactive users',
'WELCOME_PHPBB' => 'Welcome to phpBB',
));
// Inactive Users
$lang = array_merge($lang, array(
'INACTIVE_DATE' => 'Inactive date',
'INACTIVE_REASON' => 'Reason',
'INACTIVE_REASON_MANUAL' => 'Account deactivated by administrator',
'INACTIVE_REASON_PROFILE' => 'Profile details changed',
'INACTIVE_REASON_REGISTER' => 'Newly registered account',
'INACTIVE_REASON_UNKNOWN' => 'Unknown',
'INACTIVE_USERS' => 'Inactive Users',
'INACTIVE_USERS_EXPLAIN' => 'This is a list of users who have registered but whos accounts are inactive. You can activate, delete or remind (by sending an email) these users if you wish.',
'INACTIVE_USERS_EXPLAIN_INDEX' => 'This is a list of the last 10 registered users who have inactive accounts. A full list is available from the appropriate menu item or by following the link below from where you can activate, delete or remind (by sending an email) these users if you wish.',
'NO_INACTIVE_USERS' => 'No inactive users',
'SORT_INACTIVE' => 'Inactive date',
'SORT_LAST_VISIT' => 'Last visit',
'SORT_REASON' => 'Reason',
'SORT_REG_DATE' => 'Registration date',
));
// Log Entries
$lang = array_merge($lang, array(
'LOG_ACL_ADD_USER_GLOBAL_U_' => '<b>Added or edited users user permissions</b><br />&#187; %s',
@ -478,9 +495,9 @@ $lang = array_merge($lang, array(
'LOG_IMAGESET_EXPORT' => '<b>Exported imageset</b><br />&#187; %s',
'LOG_IMAGESET_REFRESHED' => '<b>Refreshed imageset</b><br />&#187; %s',
'LOG_INDEX_ACTIVATE' => '<b>Activated inactive users</b><br />&#187; %s',
'LOG_INDEX_DELETE' => '<b>Deleted inactive users</b><br />&#187; %s',
'LOG_INDEX_REMIND' => '<b>Sent reminder emails to inactive users</b><br />&#187; %s',
'LOG_INACTIVE_ACTIVATE' => '<b>Activated inactive users</b><br />&#187; %s',
'LOG_INACTIVE_DELETE' => '<b>Deleted inactive users</b><br />&#187; %s',
'LOG_INACTIVE_REMIND' => '<b>Sent reminder emails to inactive users</b><br />&#187; %s',
'LOG_INSTALL_CONVERTED' => '<b>Converted from %1$s to phpBB %2$s</b>',
'LOG_INSTALL_INSTALLED' => '<b>Installed phpBB %s</b>',