NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1

View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0017648phplist applicationUser Managementpublic17-04-15 00:5406-07-15 18:04
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.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
michiel (manager)
17-04-15 08:38

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.
duncanc (developer)
17-04-15 10:33
edited on: 17-04-15 10:33

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.

michiel (manager)
17-04-15 11:04

ah, that explains it, indeed.

Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker