Questions tagged [user-access]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
17 views

How to add default folders to Every registered User when registered in WordPress site?

I need some guidance on my work. As soon as the clients register on a WordPress site. I want the clients to see 4 folders by default: 2002 2003 2004 and Firm Documents. Once the clients activate their ...
0 votes
0 answers
18 views

Weird Issue - Wordpress Multisite - Cannot Access subdomain's pages

Good evening to everyone. I will try to describe my (weird) problem, as detailed as possible and any help would be greatly appreciated. I had a multisite that worked great. My company asked me to ...
1 vote
3 answers
1k views

Why does get_posts only show results for Admins or logged-out users?

I use a get_posts() call with these arguments: array(6) { ["include"]=> string(14) "1633,1634,1635" ["post_status"]=> string(3) "any" ["post_type"]=> string(10) "attachment" [...
0 votes
1 answer
775 views

How do I restrict a second admin certain access?

Hi I was wondering if there was a way to restrict access to certain plugins for a certain admin. For example. I want to have a second admin on my site, I want them to be able to access all plugins ...
4 votes
1 answer
1k views

Give editors access to particular plugin - turn "admin.php" into "edit.php"

I'm using the Business Opening Hours plugin. I made it appear in the sidebar using the Client Dash plugin, but when the Editor clicks it, they cannot access it, only the Admins, how can I change that? ...
0 votes
1 answer
22 views

Administrator user cannot access dashboard after localwp import

This is the 2nd time this has happened in the past few weeks so I thought I would try and get some ideas on how to overcome. There are a few others in the localwp community that have had the same ...
0 votes
1 answer
780 views

Redirect non-admin after login, and in url - /admin

How and where, can i make function, that will redirect user (if it's not admin) to my specific URL? (the same - when logged user type /wp-admin URL.)
0 votes
1 answer
44 views

Wordpress change role from administrator to author by itself (automatically)

do anybody know this kind of phenomenon? I do not have any user managing plugins installed in my WP, but after some interaction e.g. editing pages or creating postings (its not matter) WP changes for ...
9 votes
5 answers
26k views

How to restrict access to uploaded files?

I have a restricted area on a website that can only be accessed by logged in users. For that I created a page template with a 'current_user_can()' condition. My problem is that the documents attached ...
1 vote
1 answer
711 views

Can't access WordPress as an admin - but I can log in as a user! [closed]

Hi I have the following issue: I am the admin of a WordPress/WooCommerce shop that has been around for a while. As of today, when I try to log into Word Press as admin I either don't get access to the ...
3 votes
1 answer
845 views

how to update current logged user username

I need to keep in sync the username and the email of my users. I don't know if there is a better way so I have tried running this code right after the user updates his profile data: global $wpdb; $...
0 votes
1 answer
2k views

How to show private pages based on a user's role?

For example. User "Mary" should be able to view to the private page "marys page" after logging in, "Tom" should be able to view the private page "toms page", etc I created new users and am using the "...
0 votes
3 answers
2k views

How to lock Wordpress front-end with login and password?

I would like to lock whole WordPress site (all pages, all posts, whatever content I will add in the future) with login page same as for example it is made here (clear your cookies) http://facebook.com....
0 votes
1 answer
822 views

How to generate expiring URL of the page?

I have a Wordpress site with sensitive private data and I email the link of the whole page to a client via email etc. How can I expire the link after 1 Session, So if a client opened the link to visit ...
0 votes
1 answer
693 views

How to create new permission for custom post types for doing specific tasks

I am in the need to create new permissions with the following access: Post_Type_A (Custom post type): Access to Post_Type_A content type Post_Type_B (Custom post type): Access to Post_Type_B content ...
0 votes
1 answer
21 views

Get logged in user with - custom plugin

I am writing my own plugin and I am stuck quite early on. I am trying to get the ID of currently logged in user, via php script. Something like this add_action('init','do_stuff'); function do_stuff(){ ...
0 votes
0 answers
114 views

Impossible to access the site administration

I have the following issue in the WordPress: When I connect with the administrator account, the page mysite.com/wp-admin/ gives the error message: You do not have sufficient permissions to access this ...
0 votes
1 answer
38 views

(How) does WordPress protect direct access of user data?

I am setting up a WordPress with a user system. User information (names, profile picture) of all users should be private, and only accessable when logged in. The "Ultimate Member" plugin ...
2 votes
1 answer
18k views

403 Forbidden - You don't have permission to access /wp-admin/admin-ajax.php on this server

When I try to make a backup of my wordpress website through plugin I recieve the following error: "403 Forbidden - You don't have permission to access /wp-admin/admin-ajax.php on this server." This ...
0 votes
1 answer
2k views

Restrict access to trash, only admin

I'm new in WordPress. I have to restrict access to the Trash for all users except the administrator. All users CAN move to the Trash, but only admin can delete permanently or restored. I do not know ...
0 votes
0 answers
20 views

Two users attempt to modify a page

I trust you are doing well I am made a test to modify a page as an administration and an editor using incognito window for the user role editor. I have noticed even if the administrator or editor ...
18 votes
3 answers
29k views

How to programatically change username (user_login)?

As in the title, how to programatically change user's login? I wanted to use wp_insert_user function, but it appears that when updating current user, it doesn't change their username. Should I use $...
6 votes
5 answers
7k views

How can I hide a category from Contributors in the edit/add new post screen?

I have a situation where I need to hide a specific category and it's children from users who are logged in as Contributors. I don't want them to see this category and it's children in the categories ...
0 votes
1 answer
211 views

WordPress password as plain text in email

I am working on a project and we need to send users current passwords when they log in. So the only option is to the use the password reset feature when the user enters the email, an email will be ...
0 votes
0 answers
26 views

Multisite Login Access Restrictions

I am building a multisite where users can sign up to create a subsite about there business. I would like to have them be able to login to the backend and edit there subsite but restrict them from ...
0 votes
2 answers
1k views

ERROR message: "The site is experiencing technical difficulties. Please check your site admin email inbox for instructions."

I have this problem, I've completely deleted all plugins, themes and changed php to 7.1. Nothing is helping. I have the same message: "The site is experiencing technical difficulties. Please check ...
0 votes
1 answer
107 views

MySQL query to list users who never signed in

What MySQL query can I use to get a list of users who have never logged in to WP? Some background... My WordPress website has been running since 2015 and initially, I had a newsletter form that would ...
4 votes
3 answers
16k views

How can I hide media library images from general users?

As an admin I really like the features and functionality of the WordPress 3.5 media manager. With a multi-user site however all users can see all images in the media library - whether uploaded by ...
-3 votes
1 answer
97 views

Creating Custom Login Form Where Password Field is Dropdown Menu

First, I want to name that I think purchasing MemberPress and some customization of their login form would make this possible. However, we are not planning to fully utilize anything else the ...
29 votes
4 answers
55k views

How do I create a custom role capability?

I wish to create a custom capability for accessing the interface of my plugin. Should the plugin manage adding this capability to all the administrator accounts on activation? If so: Does WordPress ...
1 vote
1 answer
37 views

How do I count the number of pages a user has seen on my site, and force them to log in after a certain amount

I'm looking to write a little function that counts how many pages the user has clicked through in this section. When it gets to a certain amount, I want to prompt them to log in and prevent them from ...
1 vote
3 answers
2k views

How do I remove the Other Roles field (from User Role Editor plugin) in wp-admin/user-new.php

Screenshot below says it all. I want to remove/hide this field from view so the user is unable to edit it. It comes from the User Role Editor plugin and I want to make the changes in functions.php in ...
0 votes
1 answer
43 views

How do you manage your pages or functions that require logged-in users?

I'm having more functions and pages that require my users to be logged-in. Below is what I have in each of my functions, kind of a hassle to keep repeating this code. $user_id = get_current_user_id(); ...
6 votes
1 answer
13k views

Hide Admin Menu for Specific User ID who has administrator Role

I am trying to hide almost every single admin menu from wordpress dashboard for a specific user id who has administrator role. I want to give that user only option to edit a certain custom post type ...
1 vote
0 answers
286 views

Parent User and Child User - relate users

I need to create a system in which I have 2 types of users: Company User (C) and Employee User (E). I need C to be able to register as many E as necessary and for C users to be able to publish ...
1 vote
1 answer
47 views

if role is logged in then do something

I need some pro eyes please. Over all, I'm adding one button/link to the MAIN NAV depending on the logged in role. I have this “working” code: if ( ! function_exists( 'add_extra_item_to_nav_menu' ) ){ ...
3 votes
0 answers
743 views

How to customize wp_signon()

I am trying to get a customized sign on process. The features that are absent in WordPress by default are the following: Allow user to choose a password at the time of registration. Allow user to ...
0 votes
2 answers
5k views

Make pages visible to only logged in members

I want to make a page for each user on my website. When a user logs in, I want them to be able to click on pages that are just designed for them (basically when they log in, I want them to be able to ...
2 votes
3 answers
12k views

Access on specific pages in wordpress for a specific user

My Question is regarding User access control in wordpress I have two user - admin (admin access) and user1(editor). My requirement is admin can do any modification in admin site. But user1 can only ...
1 vote
1 answer
926 views

How to restrict CPT post's fronted view only for specific user roles?

I have a CPT named 'book' and I would like to restrict front-end view of this book, like specific role users can only view this book contents from front-end, by default anyone can see CPT posts from ...
1 vote
2 answers
5k views

Plugin to restrict access to pages in wp-admin

I've searched all day for this and couldn't find a plugin that allow me to restrict the access to specific pages in the wp-admin backed by user role. Example: I have several users on my website and I ...
6 votes
1 answer
11k views

How to assign specific users the capability to edit specific pages / posts / custom post types

I'm trying to implement what seemed like a relatively straight forward idea, basically I am building an access control plugin to control viewing and editing of a custom post type (in this case '...
4 votes
4 answers
2k views

Show custom post type endpoint in REST API just if user has capability

I created a custom post type for WP, that should just be visitable for user that have a custom capability read_cpt. Within templates and pre_get_posts I can run checks to include or exclude the CPT by ...
3 votes
3 answers
13k views

Temporarily disable user role login and replace with message

Is there a simple way to temporarily stop a user role logging in with wordpress? For example, if I have a user role called media, how can I block them from logging in? I would like a custom message to ...
0 votes
1 answer
227 views

Plugin or ways to limit number of users logging in the website,

Would like to check if there is any way (or plugin) available that can: a.limit the number of concurrent users session by of user currently logged in to the website b.limit the number of users logging ...
0 votes
2 answers
43 views

Admin Page access

There is a admin page that gives me this error on the page itself when I try to access it: “Sorry, you are not allowed to access this page.” In the console it logs: “Failed to load resource: the ...
0 votes
2 answers
706 views

How can I stop access of unregistered user in wp-content/uploads directory without using .htaccess file?

I want to give permission to only registered users into my wp-content/uploads directory and stop access for those users which are not members on my site.
0 votes
1 answer
215 views

Hide all pages except landing page

I'm working on a website that is still being built; however, the client would like to launch a landing page while it is being finished. What is the easiest way to make it so all the pages of the site ...
1 vote
1 answer
1k views

DOMAIN_CURRENT_SITE constant being regularly overridden [closed]

A few times now, our site's DOMAIN_CURRENT_SITE constant, stored inside wp-config.php has been overridden by what appears to be a reverse DNS of our sites IP address... Since we use AWS elastic IPs, ...
0 votes
1 answer
45 views

Infinite redirects at front end if logged in user is not an Admin (Toolset Access)

I bought the toolset access plugin to handle specific user roles for languages. Once I log in as a user - which is not an admin - can be any like editor, contributor etc. The front end will not be ...

1
2 3 4 5
8