Get admin/users mostly working. Still need to associate channels with accounts.
This commit is contained in:
parent
dd45daaad8
commit
fbc5260995
@ -566,20 +566,9 @@ function admin_page_users(&$a){
|
|||||||
|
|
||||||
// FIXME this is borked since there is no more user table
|
// FIXME this is borked since there is no more user table
|
||||||
|
|
||||||
$users = q("SELECT `user` . * , `contact`.`name` , `contact`.`url` , `contact`.`micro`, `lastitem`.`lastitem_date`
|
// $users = q("SELECT `account_email` FROM `account`
|
||||||
FROM
|
// ",
|
||||||
(SELECT MAX(`item`.`changed`) as `lastitem_date`, `item`.`uid`
|
$users =q("SELECT `account_id` , `account_email`, `account_lastlog`, `account_created`, `account_service_class` FROM `account`",
|
||||||
FROM `item`
|
|
||||||
WHERE `item`.`type` = 'wall'
|
|
||||||
GROUP BY `item`.`uid`) AS `lastitem`
|
|
||||||
RIGHT OUTER JOIN `user` ON `user`.`uid` = `lastitem`.`uid`,
|
|
||||||
`contact`
|
|
||||||
WHERE
|
|
||||||
`user`.`uid` = `contact`.`uid`
|
|
||||||
AND `user`.`verified` =1
|
|
||||||
AND `contact`.`self` =1
|
|
||||||
ORDER BY `contact`.`name` LIMIT %d, %d
|
|
||||||
",
|
|
||||||
intval($a->pager['start']),
|
intval($a->pager['start']),
|
||||||
intval($a->pager['itemspage'])
|
intval($a->pager['itemspage'])
|
||||||
);
|
);
|
||||||
@ -591,6 +580,7 @@ function admin_page_users(&$a){
|
|||||||
t('Community/Celebrity Account'),
|
t('Community/Celebrity Account'),
|
||||||
t('Automatic Friend Account')
|
t('Automatic Friend Account')
|
||||||
);
|
);
|
||||||
|
|
||||||
$e['page_flags'] = $accounts[$e['page-flags']];
|
$e['page_flags'] = $accounts[$e['page-flags']];
|
||||||
$e['register_date'] = relative_date($e['register_date']);
|
$e['register_date'] = relative_date($e['register_date']);
|
||||||
$e['login_date'] = relative_date($e['login_date']);
|
$e['login_date'] = relative_date($e['login_date']);
|
||||||
@ -617,7 +607,7 @@ function admin_page_users(&$a){
|
|||||||
'$unblock' => t('Unblock'),
|
'$unblock' => t('Unblock'),
|
||||||
|
|
||||||
'$h_users' => t('Users'),
|
'$h_users' => t('Users'),
|
||||||
'$th_users' => array( t('Name'), t('Email'), t('Register date'), t('Last login'), t('Last item'), t('Account') ),
|
'$th_users' => array( t('Name'), t('Email'), t('Register date'), t('Last login'), t('Last item'), t('Account'), t('Service Class')),
|
||||||
|
|
||||||
'$confirm_delete_multi' => t('Selected users will be deleted!\n\nEverything these users had posted on this site will be permanently deleted!\n\nAre you sure?'),
|
'$confirm_delete_multi' => t('Selected users will be deleted!\n\nEverything these users had posted on this site will be permanently deleted!\n\nAre you sure?'),
|
||||||
'$confirm_delete' => t('The user {0} will be deleted!\n\nEverything this user has posted on this site will be permanently deleted!\n\nAre you sure?'),
|
'$confirm_delete' => t('The user {0} will be deleted!\n\nEverything this user has posted on this site will be permanently deleted!\n\nAre you sure?'),
|
||||||
|
@ -66,11 +66,12 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td><img src="$u.micro" alt="$u.nickname" title="$u.nickname"></td>
|
<td><img src="$u.micro" alt="$u.nickname" title="$u.nickname"></td>
|
||||||
<td class='name'><a href="$u.url" title="$u.nickname" >$u.name</a></td>
|
<td class='name'><a href="$u.url" title="$u.nickname" >$u.name</a></td>
|
||||||
<td class='email'>$u.email</td>
|
<td class='email'>$u.account_email</td>
|
||||||
<td class='register_date'>$u.register_date</td>
|
<td class='register_date'>$u.account_created</td>
|
||||||
<td class='login_date'>$u.login_date</td>
|
<td class='login_date'>$u.account_lastlog</td>
|
||||||
<td class='lastitem_date'>$u.lastitem_date</td>
|
<td class='lastitem_date'>$u.lastitem_date</td>
|
||||||
<td class='login_date'>$u.page_flags</td>
|
<td class='login_date'>$u.page_flags</td>
|
||||||
|
<td class='service_class'>$u.account_service_class</td>
|
||||||
<td class="checkbox"><input type="checkbox" class="users_ckbx" id="id_user_$u.uid" name="user[]" value="$u.uid"/></td>
|
<td class="checkbox"><input type="checkbox" class="users_ckbx" id="id_user_$u.uid" name="user[]" value="$u.uid"/></td>
|
||||||
<td class="tools">
|
<td class="tools">
|
||||||
<a href="$baseurl/admin/users/block/$u.uid?t=$form_security_token" title='{{ if $u.blocked }}$unblock{{ else }}$block{{ endif }}'><span class='icon block {{ if $u.blocked==0 }}dim{{ endif }}'></span></a>
|
<a href="$baseurl/admin/users/block/$u.uid?t=$form_security_token" title='{{ if $u.blocked }}$unblock{{ else }}$block{{ endif }}'><span class='icon block {{ if $u.blocked==0 }}dim{{ endif }}'></span></a>
|
||||||
|
Reference in New Issue
Block a user