View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
20060Bug reportsUser / Groups / Rolespublic2025-04-28 15:13
Reportermo2025 Assigned Toc_schmitz  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version6.6.x 
Summary20060: Deleting a user is not possible
Description

I opened the page "User management"

I tried to delete an user in the user list.
I get the info: Error

Info:
It is possible to delete users in general, but for some reason, I dont know, it is not possible for all:
This is not for all user, but for one user.

Steps To Reproduce

Steps to reproduce

I opened the page "User management"

I tried to delete an user in the user list.
I get the info: Error

Expected result

User is deleted OR When user cant be deleted, I would have expected the reason why.

Actual result

User is not deleted. I get the info "error", but no more information.
Even when I set log levels to 2, I do not get more information in this section.

(Write here what happened instead)
= = = = = =

TagsNo tags attached.
Attached Files
limesurvey-user.png (27,807 bytes)   
limesurvey-user.png (27,807 bytes)   
limesurvey-user-error.png (12,761 bytes)   
limesurvey-user-error.png (12,761 bytes)   
Bug heat8
Complete LimeSurvey version number (& build)6.12.0+250317
I will donate to the project if issue is resolvedNo
BrowserChrome / any browser
Database type & versionMicrosoft Azure SQL Server
Server OS (if known)Ubuntu Server
Webserver software & version (if known)Apache
PHP Version8.1.32

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2025-04-17 14:32

administrator   ~82435

Have you maybe configured that user ID as a forced SuperAdmin?

Check for forcedsuperadmin in config-default.php and config.php

c_schmitz

c_schmitz

2025-04-17 15:07

administrator   ~82436

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=38791

c_schmitz

c_schmitz

2025-04-17 15:16

administrator   ~82437

I have added a fix so that in the next version a proper error should be shown.

c_schmitz

c_schmitz

2025-04-17 15:19

administrator   ~82438

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=38792

mo2025

mo2025

2025-04-17 16:15

reporter   ~82440

@c_schmitz: Thank you for your hint and the fix for more informatoin.

But all I have in config-default.php is line

674:$config['forcedsuperadmin'] = array(1);

The user I try to delete is ID 2.
Maybe an array key shift?
0 => 1 ?
1 => 2 ?

mo2025

mo2025

2025-04-17 16:22

reporter   ~82441

Sorry - no, the suggestion with the shift key makes no sense when you look at it:

grep -R forcedsuperadmin
config/config-defaults.php:$config['forcedsuperadmin'] = array(1);
helpers/update/updatedb_helper.php: $forcedSuperadmin = Yii::app()->getConfig('forcedsuperadmin');
models/SettingGlobal.php: 'forcedsuperadmin', // This is for security
models/User.php: /
OR are inside forcedsuperadmin config */
models/User.php: $criteria->addInCondition('t.uid', App()->getConfig('forcedsuperadmin'), 'OR');
models/Permission.php: return in_array($iUserID, App()->getConfig('forcedsuperadmin'));

c_schmitz

c_schmitz

2025-04-17 17:03

administrator   ~82442

Can you try to manually apply the fix (the small one) and check if you get a different error?

mo2025

mo2025

2025-04-17 17:11

reporter   ~82443

�This fixed my issue, thank you @C_schmitz.

I was given the option of transferring the existing surveys for the user to another user.

Thank you!

image.png (6,607 bytes)   
image.png (6,607 bytes)   
Mazi

Mazi

2025-04-28 11:33

updater   ~82495

@c_schmitz, we noticed that when using the mass action delete function, the "error" notice at the user's screenshot gets shown for users owning surveys. In this case the dleete option fails.
Other users which are not owning any surveys can be deleted.
For survey owners deletion works if you use the "Delete" option from the "Action" menu on the right.

Does your fix already cover the case of survey owners?

c_schmitz

c_schmitz

2025-04-28 14:16

administrator   ~82497

Yep, it should. Please verify.

LimeBot

LimeBot

2025-04-28 15:13

administrator   ~82500

Fixed in Release 6.13.1+250428

Related Changesets

LimeSurvey: master 53f45711

2025-04-17 14:33

c_schmitz


Details Diff
Fixed issue 20060: If a user cannot be delete due to being forced superadmin no specific error is shown Affected Issues
20060
mod - application/controllers/UserManagementController.php Diff File

LimeSurvey: master 74ac025a

2025-04-17 15:10

c_schmitz


Details Diff
Fixed issue 20060: If a user cannot be delete due to being forced superadmin no specific error is shown Affected Issues
20060
mod - application/controllers/UserManagementController.php Diff File

Issue History

Date Modified Username Field Change
2025-04-15 13:41 mo2025 New Issue
2025-04-15 13:41 mo2025 File Added: limesurvey-user.png
2025-04-15 13:41 mo2025 File Added: limesurvey-user-error.png
2025-04-17 14:32 c_schmitz Note Added: 82435
2025-04-17 14:32 c_schmitz Bug heat 0 => 2
2025-04-17 15:07 c_schmitz Changeset attached => LimeSurvey master 53f45711
2025-04-17 15:07 c_schmitz Note Added: 82436
2025-04-17 15:07 c_schmitz Assigned To => c_schmitz
2025-04-17 15:07 c_schmitz Status new => resolved
2025-04-17 15:07 c_schmitz Resolution open => fixed
2025-04-17 15:16 c_schmitz Note Added: 82437
2025-04-17 15:19 c_schmitz Changeset attached => LimeSurvey master 74ac025a
2025-04-17 15:19 c_schmitz Note Added: 82438
2025-04-17 16:15 mo2025 Note Added: 82440
2025-04-17 16:15 mo2025 Bug heat 2 => 4
2025-04-17 16:22 mo2025 Note Added: 82441
2025-04-17 17:03 c_schmitz Note Added: 82442
2025-04-17 17:11 mo2025 Note Added: 82443
2025-04-17 17:11 mo2025 File Added: image.png
2025-04-28 11:33 Mazi Note Added: 82495
2025-04-28 11:33 Mazi Bug heat 4 => 6
2025-04-28 14:16 c_schmitz Note Added: 82497
2025-04-28 15:13 LimeBot Note Added: 82500
2025-04-28 15:13 LimeBot Status resolved => closed
2025-04-28 15:13 LimeBot Bug heat 6 => 8