View Issue Details

IDProjectCategoryView StatusLast Update
0017648phpList 3 applicationAdmin Managementpublic06-07-15 18:04
Reportermklzamora Assigned To 
Status resolvedResolutionfixed 
PlatformLinuxOSUbuntuOS Version4.8.2
Product Version3.0.12 
Target Version3.0.XFixed in Version3.2.0 
Summary0017648: Cannot create new admin users
DescriptionCreating new admin users via the admin console always results in 'Error adding new admin, login name and/or email not inserted, email not valid or admin already exists' even if all fields are set properly. I checked the source in /admin.php and saw that the insert query in line 48 does not include the 'email' field causing the error. Adding the email column and value in the query solves this problem.
Steps To Reproduce1. Go to admin console -> Config -> Manage Administrators -> Add a new Administrator
2. Fill up the form and click 'Save changes'
Additional InformationAdding the email column and value in the insert query (admin.php, line 48) solves this problem.
TagsNo tags attached.



17-04-15 08:38

administrator   ~0056020

Interesting. I can see what you mean in adding the email column, but strangely enough it works for me on the existing code. Needs a bit of digging to understand better.


17-04-15 10:33

updater   ~0056021

Last edited: 17-04-15 10:33

View 2 revisions

The email column is defined as not null without a default value, so it is "wrong" to try to insert without giving the column a value.
Depending on the mysql mode (strict or not), either the insert statement will fail or mysql will use an implicit default value. I guess that strict mode is in effect in your case.


17-04-15 11:04

administrator   ~0056022

ah, that explains it, indeed.