Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
6fb1c5ef
Commit
6fb1c5ef
authored
Dec 04, 2007
by
Richard Mansfield
Browse files
Fix suspended users to get institution from usr_institution table
parent
bfe95881
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/admin/users/suspended.json.php
View file @
6fb1c5ef
...
...
@@ -38,14 +38,15 @@ $offset = param_integer('offset', 0);
// NOTE: the check is not done on the 'active' column here, since suspended
// users are by definition not active. However deleted users are filtered out.
$count
=
get_field_sql
(
'SELECT COUNT(*) FROM {usr} WHERE suspendedcusr IS NOT NULL AND deleted = 0'
);
$data
=
get_records_sql_array
(
'SELECT u.id, u.firstname, u.lastname, u.studentid, u.suspendedreason AS reason,
$data
=
get_records_sql_array
(
'SELECT
DISTINCT ON (u.suspendedctime, u.id)
u.id, u.firstname, u.lastname, u.studentid, u.suspendedreason AS reason,
i.displayname AS institution, ua.firstname AS cusrfirstname, ua.lastname AS cusrlastname
FROM {usr} u
LEFT JOIN {institution} i ON (u.institution = i.name)
LEFT OUTER JOIN {usr_institution} ui ON (ui.usr = u.id)
LEFT OUTER JOIN {institution} i ON (ui.institution = i.name)
LEFT JOIN {usr} ua on (ua.id = u.suspendedcusr)
WHERE u.suspendedcusr IS NOT NULL
AND u.deleted = 0
ORDER BY u.suspendedctime
ORDER BY u.suspendedctime
, u.id
LIMIT ?
OFFSET ?'
,
array
(
$limit
,
$offset
));
if
(
!
$data
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment