Browse Source

Admin panel: show if an account has expired

pull/629/head
Tobias Diekershoff 8 years ago
parent
commit
7186331a89
3 changed files with 11 additions and 4 deletions
  1. +3
    -2
      mod/admin.php
  2. +7
    -1
      view/admin_users.tpl
  3. +1
    -1
      view/smarty3/admin_users.tpl

+ 3
- 2
mod/admin.php View File

@ -694,7 +694,7 @@ function admin_page_users(&$a){
}
$users = q("SELECT `user` . * , `contact`.`name` , `contact`.`url` , `contact`.`micro`, `lastitem`.`lastitem_date`
$users = q("SELECT `user` . * , `contact`.`name` , `contact`.`url` , `contact`.`micro`, `lastitem`.`lastitem_date`, `user`.`account_expired`
FROM
(SELECT MAX(`item`.`changed`) as `lastitem_date`, `item`.`uid`
FROM `item`
@ -718,7 +718,7 @@ function admin_page_users(&$a){
t('Normal Account'),
t('Soapbox Account'),
t('Community/Celebrity Account'),
t('Automatic Friend Account')
t('Automatic Friend Account')
);
$e['page-flags'] = $accounts[$e['page-flags']];
$e['register_date'] = relative_date($e['register_date']);
@ -756,6 +756,7 @@ function admin_page_users(&$a){
'$block' => t('Block'),
'$unblock' => t('Unblock'),
'$siteadmin' => t('Site admin'),
'$accountexpired' => t('Account expired'),
'$h_users' => t('Users'),
'$th_users' => array( t('Name'), t('Email'), t('Register date'), t('Last login'), t('Last item'), t('Account') ),


+ 7
- 1
view/admin_users.tpl View File

@ -70,7 +70,13 @@
<td class='register_date'>$u.register_date</td>
<td class='login_date'>$u.login_date</td>
<td class='lastitem_date'>$u.lastitem_date</td>
<td class='login_date'>$u.page_flags {{ if $u.is_admin }}($siteadmin){{ endif }}</td>
<td
class='login_date'>$u.page_flags
{{ if $u.is_admin
}}($siteadmin){{ endif }} {{ if
$u.account_expired
}}($accountexpired){{ endif
}}</td>
<td class="checkbox">
{{ if $u.is_admin }}
&nbsp;


+ 1
- 1
view/smarty3/admin_users.tpl View File

@ -75,7 +75,7 @@
<td class='register_date'>{{$u.register_date}}</td>
<td class='login_date'>{{$u.login_date}}</td>
<td class='lastitem_date'>{{$u.lastitem_date}}</td>
<td class='login_date'>{{$u.page_flags}} {{if $u.is_admin}}({{$siteadmin}}){{/if}}</td>
<td class='login_date'>{{$u.page_flags}} {{if $u.is_admin}}({{$siteadmin}}){{/if}} {{if $u.accountexpired}}{{$account_expired}}{{/if}}</td>
<td class="checkbox">
{{if $u.is_admin}}
&nbsp;


Loading…
Cancel
Save