The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once



UserSpice
Delete user - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: Delete user (/showthread.php?tid=1070)



Delete user - alexuco - 05-29-2018

Hi all! Today I was working hard testing user's roles(permission), etc and I've noticed that just the Admin is able to delete any other users. I've worked into this app for a company with some workers with more permission levels than a simple user that in my case are just CLIENTS.

What I would like to achieve is that 'workers' be able to DELETE users ('1').
DO you think I could do that without break any hard rule code of US. (in order not to complicate my life in the future). That workers now are able to access to some features of Dashboard.

In this app I just have 4 levels [0,1,2,3]


Delete user - Brandin - 05-30-2018

Hi @alexuco!

admin_user code dictates that if they are not within Group 2 (Default Admin) or UID 1, they cannot delete users. You will need to modify core code to do this, I would just copy it to usersc and do it, Line 614 approx. You'll also need to copy the if function you put there to the delete function in the PHP tags near the beginning.

Brandin.