Pass post/topic counts and group name to get user calls.
このコミットが含まれているのは:
コミット
e4cfebb177
|
@ -72,30 +72,32 @@ class UserController extends Controller {
|
|||
public function getUsers(Request $request) { // /api/rpc/user/user/getusers
|
||||
$getting = array(
|
||||
'users.id',
|
||||
'username',
|
||||
'perm_id',
|
||||
'reg_date',
|
||||
'gender',
|
||||
'avatar',
|
||||
'name_style',
|
||||
'display_name',
|
||||
'country'
|
||||
'usr_perm_module.name as group_name',
|
||||
'users.username',
|
||||
'usr_perm_id.perm_id',
|
||||
'usr_details.reg_date',
|
||||
'usr_profile.gender',
|
||||
'usr_profile.avatar',
|
||||
'usr_profile.name_style',
|
||||
'usr_profile.display_name',
|
||||
'usr_profile.country'
|
||||
);
|
||||
|
||||
$valid = $this->objAuth->getPermissions($request->username, $request->password);
|
||||
|
||||
if ($valid['usr_emailshow'] == 1) {
|
||||
array_push($getting, 'email');
|
||||
array_push($getting, 'users.email');
|
||||
}
|
||||
|
||||
if ($valid['usr_ipshow'] == 1) {
|
||||
array_push($getting, 'ip_address');
|
||||
array_push($getting, 'usr_details.ip_address');
|
||||
}
|
||||
|
||||
return DB::table('users')
|
||||
->join('usr_details', 'usr_details.user_id', '=', 'users.id')
|
||||
->join('usr_profile', 'usr_profile.user_id', '=', 'users.id')
|
||||
->join('usr_perm_id', 'usr_perm_id.user_id', '=', 'users.id')
|
||||
->join('usr_perm_module', 'usr_perm_module.id', 'usr_perm_id.perm_id')
|
||||
->get($getting);
|
||||
}
|
||||
|
||||
|
@ -103,8 +105,13 @@ class UserController extends Controller {
|
|||
$getting = array(
|
||||
'users.id',
|
||||
'users.username',
|
||||
'usr_perm_module.name as group_name',
|
||||
'usr_profile.display_name',
|
||||
'usr_profile.name_style',
|
||||
'usr_perm_id.perm_id',
|
||||
'usr_profile.member_title',
|
||||
'usr_details.total_posts',
|
||||
'usr_details.total_threads',
|
||||
'usr_details.reg_date',
|
||||
'usr_contacts.website_link',
|
||||
'usr_contacts.website_name',
|
||||
|
@ -113,8 +120,6 @@ class UserController extends Controller {
|
|||
'usr_profile.birthday',
|
||||
'usr_profile.bio',
|
||||
'usr_profile.avatar',
|
||||
'usr_profile.name_style',
|
||||
'usr_profile.display_name',
|
||||
'usr_profile.country',
|
||||
'usr_contacts.website_link',
|
||||
'usr_contacts.website_name',
|
||||
|
@ -127,7 +132,9 @@ class UserController extends Controller {
|
|||
'usr_contacts.twitter'
|
||||
);
|
||||
|
||||
$check = $this->objAuth->checkLegit($request->username, $request->password);
|
||||
$valid = $this->objAuth->getPermissions($request->username, $request->password);
|
||||
$cols = $this->getGroupColours()->toArray();
|
||||
|
||||
if ($valid['usr_emailshow'] == 1) {
|
||||
array_push($getting, 'users.email');
|
||||
|
@ -146,7 +153,8 @@ class UserController extends Controller {
|
|||
->join('usr_profile', 'usr_profile.user_id', '=', 'users.id')
|
||||
->join('usr_contacts', 'usr_contacts.user_id', '=', 'users.id')
|
||||
->join('usr_perm_id', 'usr_perm_id.user_id', '=', 'users.id')
|
||||
->where('id', $id)
|
||||
->join('usr_perm_module', 'usr_perm_module.id', 'usr_perm_id.perm_id')
|
||||
->where('users.id', $id)
|
||||
->get($getting);
|
||||
}
|
||||
|
||||
|
|
新しいイシューから参照