You need to login to send post. No account yet? Create one:
Create account
Allow normal admin of PHP list delete users, when as defaul they cannot delete them
Wed, 08/18/2010 - 16:13
Website is quite complex thing, so one of main tasks of webdesigner is make live of users easier. That means show them just such admin functions, which they really need and understand.
PHP list is useful and great tool for management of mailing list, but it has one problem: you have to be superadmin if you are want to delete users from database. But what if you actually want to give your users rights of superadmin (include deleting users from database), but don't make him confused of too many setup possibilities?
Solution is simple in editing of two files in PHP list installation:
1. /lists/admin/commonlib/pages/user.php
- Change line 240 on: if ($require_login && !(isSuperUser() || $access=="all" || $access=="owner")) {
2. /lists/admin/commonlib/pages/users.php
- Change line 196 on: if (!empty($delete) && (isSuperUser() || $access=="all" || $access=="owner")) {
Now your admin can delete all users or own user, depends on permissions.
Enjoy!


















