View Issue Details

IDProjectCategoryView StatusLast Update
0023900mantisbtadministrationpublic2018-02-07 02:55
Reporterfman Assigned Tovboctor  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version2.10.0 
Fixed in Version2.11.0 
Summary0023900: Unable to update user access level, due to check on 'Realname' returning KO (APPLICATION ERROR #807)
Description

I've checked function user_ensure_realname_unique() on Mantis 2.8.0 and Mantis 2.10.0, a change has been introduced (check by return value = 0), that blocks update of user access level, no matter there are no other users on Mantis with the same username or real name.

Steps to reproduce
1) create a new user with username and real name not present on Mantis
username: user-not-on-system
real name: Real Name Jr
access level: reporter

2) Try to change user access level
you will get APPLICATION ERROR #807

TagsNo tags attached.

Relationships

related to 0023838 closedvboctor Create user via REST API 
related to 0023909 closedvboctor User realname uniqueness check doesn't work 

Activities

vboctor

vboctor

2018-01-28 18:05

manager   ~0058652

I can't reproduce this on master.

vboctor

vboctor

2018-01-28 18:08

manager   ~0058653

Actually, I can reproduce on master but not on master-2.10.

vboctor

vboctor

2018-01-28 18:26

manager   ~0058654

Looked further into this, it seems we had a bad check and when fixed it exposed a bug in logic for 2.10.0 release and earlier.

  • In 2.10.0, the uniqueness check for real name didn't work, enabling creating users with duplicate real names.
  • In master, this uniqueness check was fixed as part of 0023838 - this caused the underlying bug to not allow updating users.
vboctor

vboctor

2018-01-30 01:42

manager   ~0058668

PR: https://github.com/mantisbt/mantisbt/pull/1277

Related Changesets

MantisBT: master cf5baefa

2018-01-29 20:34

vboctor


Details Diff
Fix username and realname uniqueness checks

- Fix user realname uniqueness check which wasn’t working.
- Remove `$g_differentiate_duplicates` config option.
- Change username realname uniqueness check APIs to not take in username, since these are independent operations.

Fixes 0023909, 0023900
Affected Issues
0023900, 0023909
mod - account_update.php Diff File
mod - config_defaults_inc.php Diff File
mod - core/obsolete.php Diff File
mod - core/user_api.php Diff File
mod - manage_user_update.php Diff File