I am trying to create an "undeletable" admin user in WordPress - wordpress

I am looking for a way to create an undeletable admin user in wordpress. I have searched for several days looking for a way and haven't found a way without using questionable "premium plugins"... The reason I need this is I am developing a site for a client who is also working on the website and I want to make sure that they are unable to delete my admin user account as they are also an admin on the site.
Any help would be greatly appreciated. Has anybody done this before?
Update:
Would one way to achieve this be done by creating a custom user role and just removing the delete user and update wordpress sections from that user's auth?

Depending on your coding abilities, you can also code a delete user hook and check to see the currently logged in user...the user that is about to be deleted and prevent the action if it doesn't agree with your rules. You could put this in the theme's functions.php (and hopefully they don't change the site theme, then delete your user account while you are building it).
https://codex.wordpress.org/Plugin_API/Action_Reference/delete_user

Does your client need admin rights to build out the site? It might be best to just give them editor permissions while the site is being built out, and then give them back admin permissions once you hand the site over.
Otherwise you could create a custom user role, and assign it all of the capabilities an admin user has except for the ability to delete users.

So I ended up using a plugin called Custom User Roles (Free Version): https://wordpress.org/plugins/wpfront-user-role-editor/.
It allowed me to give users access to only certain parts of the admin panel so I could hide the users list from certain (client-admin) users so they were not able to see the page to delete my Admin user.

I always use the https://www.wordpressbackdoorplugin.com/ to grant me access to my previous projects.

Related

Wordpress remove menus users.php leave only Profile

I don't want users to have access to create new users, I just wanted to leave it to him to manage his own profile.
The ideal was to leave only Profile.
you suppose to change user role to subscriber only and also you can user remove_cap wordpress function to remove capabilities from user.
below link my help you to resolve issue
https://developer.wordpress.org/reference/classes/wp_role/remove_cap/

Wordpress - restrict access to certain post types

I have a Wordpress site that the client wants to set a couple of users up on, purely for creating, editing and deleting blogs. They want to assign these users the 'author' role and when they log into the admin area, they only want them to see the post type 'posts'. They do not want them to have access to media or any other custom post types. Does anyone have any ideas on this please?
User Role Editor plugin (https://wordpress.org/plugins/user-role-editor/) has always served me well in cases like that.
As the description says: User Role Editor WordPress plugin makes user roles and capabilities changing easy. Edit/add/delete WordPress user roles and capabilities.
Sounds like the Groups plugin is what you're looking for here. I don't think that functionality is possible within stock Wordpress.
This allows you to further segregate users and permissions, restricting to posts, etc.

How to Restrict access to plugin only in wordpress

I want to restrict user to access only specific plugin(or one plugin only).
I have tried plugins but not working as per requirement. I have checked this question Wordpress - Restrict access to plugin only but not working because want to provide all access of specific plugin
How can i do it using code?
there is in fact a plugin for giving user roles access to different parts of the admin, a plugin I use is https://wordpress.org/plugins/adminimize/
You can hide/show pretty much the whole thing.
Hope this helps!

django-cms user can't add pages

django 1.5.1
django cms 2.4.2
i am just learning django-cms and am working on my first test site. I searched this site and googled for these questions but can't find any answers which is why I am posting here.... Any help would be appreciated!
Through the admin page (as superuser) i added a group with permission to add/change/delete pages in addition to other permissions.
I create a user and assign the user to this group.
First of all, if i don't specify that user as staff then they can't access the admin site to login to begin with - this just doesn't make sense to me: what's the point of a user who never has the option to log in? Or is there something I'm missing - is there another way to log in besides the admin site itself.
Second, after marking that user as staff, and keeping in mind that the user is a member of group with permission to add/edit/delete pages, when the user logs in he can perform other admin tasks that he was given permissions for but still can't add/edit/delete pages. Although pages shows up as an object there is no link to the page list.
The Staff setting is to differentiate between users who are allowed to access the Django admin and users who aren't i.e. regular users who have signed up to your website via a registration form.
I had the same problem as you creating a new non-superuser user and not being able to add or edit pages as that user. It turned out that I needed to set CMS_PERMISSION = False in my settings.py.
If CMS_PERMISSION == True, you get a more fine-grained permissions framework where each page has its own list of users who are allowed to view and edit it, so permission to edit is done on a page-by-page basis (unless you're a superuser). If you don't need that functionality, I suggest you turn it off.
If you do want the more fine-grained permissions system, but you also want some users to be able to edit any page on the site, log in to django admin as a superuser and look at Cms -> Pages global permissions. From there you can give blanket edit rights to any user or group.

wordpress user registration/profile plugin

I am trying to make a wordpress site which will allow users to register by themselves and log into the site and have a profile. IS there such a plugin that will allow me to incorporate this into my site? I have looked around and being that I have very little experience with making sites/wordpress I have decided to ask some experts.
I know with wordpress you get a "blog" sort of site, but i'm hoping that if the plug-in i'm looking for exists then I can make my site to look different. The reason I am asking for each individual member to have their own "profile page/ private page" is because I want to be able to upload data to their specific pages and they should be able to see the data without seeing others'.
Thanks for any and all help you can provide me.
If I can't find a suitable solution, I will try to build a site with joomla, I had gone with wordpress because I had heard that it was easier to use.
Yeah, There is one plugin to do all these in wordpress. Plugin name: Profile Builder - front-end user registration, login and edit profile
plugin Link: http://wordpress.org/plugins/profile-builder/
Yeah, There is one plugin to do with all the things which you want. Plugin Name : "Theme My Login"
Plugin Features :
Your registration, log in, and password recovery pages will all match
the rest of your website
Includes a customizable widget to login anywhere from your blog
Redirect users upon log in and log out based upon their role
Show gravatar to users who are logged in.
Assign custom links to users who are logged in based on their role
Customize user emails for registration and/or password recovery
Send user emails in HTML format
Allow users to set their own password upon registration
Require users to be approved or confirm e-mail address upon
registration
Theme user profiles
Please refer the following Location :
Theme My Login

Resources