Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Not a bug
-
Affects Version/s: 1.7
-
Fix Version/s: 1.7
-
Component/s: Administration
-
Labels:None
-
Environment:linux
-
Database:PostgreSQL
-
Affected Branches:MOODLE_17_STABLE
-
Fixed Branches:MOODLE_17_STABLE
Description
the get_admin function returns the first of the admin users identified by the get_admins() function, which orders based on ra.id. Oddly this ordering seems to be character rather than integer ordering, because user id 16 is coming first instead of user id 3.
This means that any site admin user might be used to, for example, send the account sign-up email to, rather than the super user account - which would be the lowest numerical id. It looks a bit odd this way - I expected get_admin to give me the superuser account.
Issue Links
| This issue has been marked as being related by: | ||||
| MDL-30625 | get_admin() seems to return random admin user instead |
|
|
|
Hmm, this works fine for me (MySQL) as it should. The sort is fairly straightforward.
Can you check on your Postgres database and make sure that the ra.id field is an integer field?