Questions tagged [login]

Refers to the act of gaining access to a WordPress site, as well as the WordPress account itself.

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

How to customize password reset form

I'm working on a custom user flow. I have a registration form that is working fine and is powered by vuejs and rest routes, and a custom login form that will use a standard php and html template to ...
  • 7
0 votes
0 answers
10 views

Prevent users from display default wordpress login form

I have created a custom login form and it's working fine. I've assigned it to a template page and it is displayed when the user hit the www.example.org/login url of my site. I need a way to manage ...
  • 7
0 votes
0 answers
5 views

login redirect based on user role not work as expected

I have this code in my wordpress custom plugin <?php public function role_login_redirect() { $redirect_to; $user = wp_get_current_user(); if( isset($user->roles) && is_array(...
  • 7
0 votes
1 answer
35 views

Check user last login date

I need to show to the user a password change page at first login and ever month. Is there any hook or filter that can I use to check in my plugin code when the user have done last login?
  • 7
0 votes
0 answers
10 views

Wordpress - Security Question at Login from User's Meta Data

How can I add KBA (Knowledge-based authentication) Field at the time of login in WordPress? That field can be anything submitted by the user at the time of registration. For example … At the time of ...
0 votes
1 answer
14 views

Does wp_login hook fire on user registration?

My site is set to immediately login a user after they register. I'm writing a plug-in which needs to fire wherever a user logs in. If I order the wp_login hook, will this fire at user registration (...
  • 141
0 votes
0 answers
17 views

Browser Caching for Logged in Users

We've run into sort of a quirky problem with browser caching that I'm having a hard time finding an answer to. When users log in to the site, if they go to a page they have already visited, it will ...
0 votes
0 answers
10 views

determine active user browser at the same time

I want to check my users just online with 3 browsers at the same time. $user_active_browser = get_user_meta($userID, 'session_tokens', true); $user_active_browser = count($user_active_browser); if ($...
  • 191
-3 votes
1 answer
28 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 ...
  • 1
0 votes
2 answers
19 views

issue with my wp site after login

I'm seeing an odd issue with my wp site. The problem is that it works fine locally but some people report seeing it at their side. They report that after a login the navigation bar shows that they are ...
0 votes
1 answer
45 views

Multiple issues with Ajax login function due to browsers and cookies

Using basic usage of ajax login wordpress, no cookie wordpress_logged_in_ are created on safari and Chrome and firefox doesn't read user when cookie "wordpress_logged_in". I have several ...
  • 11
0 votes
0 answers
12 views

CPU overload spam - redirect link to wp-admin and new post

I noticed my wordpress website is over utilizing CPU resources causing my shared hosting to trottle slowing down drastically my website. Upon doing a CPanel inspection on resources, I found this ...
  • 61
0 votes
1 answer
24 views

Can I Get User ID at Login?

My goal is to allow my users to select their choice of redirect page after login but it doesn't seem that the user ID is available after login? Here is my code. Any help is GREATLY appreciated!!! ...
0 votes
0 answers
15 views

define two login page url

I am wondering if it is possible to define two or more login page URL for different roles. I mean, is it possible to define some URL only for admin login page, like: www.example.com/admin-login and ...
  • 103
0 votes
0 answers
10 views

Abnormal activity at url /my-account/add-payment-method/

I have just noticed that my online shop (WordPress+WooCommerce) has an abnormal number of unique page views at the url /my-account/add-payment-method/ starting with May 12 onwards: around 60-70 per ...
  • 1
0 votes
1 answer
41 views

How to make a user be able to register if such a login already exists?

And then to log in only by e-mail and password.
0 votes
0 answers
19 views

Is there something I need to know in order to use Wordpress on foreign (Swedish) TLDs?

So I have a wordpress multisite site for a client who moved to to Sweden from the US recently and has since contracted my for 4 more websites to go to urls with the Swedish TLD (.se). I'm able to ...
  • 101
0 votes
2 answers
50 views

Is it possible to add the_content filter upon login?

I've added a wp_login action and it's getting executed. Then within that function, I'm adding a filter to the_content so that a script gets inserted upon certain conditions but it's not getting ...
  • 1
0 votes
2 answers
32 views

Show Site Name on WP login screen

I'm trying to create a generic, re-usable function that shows the site name on the login screen. It works with just static text, but how do I pull in the site name dynamically? Here's what I've tried: ...
0 votes
1 answer
23 views

Does wordpress support natively the concept of logging-in users? (not admins, but users of the website)

I need to create a small members area, probably for about 1000 users, not more. I want to set private information there, forms, interaction, etc. More in particular it'll be for "providers" ...
0 votes
0 answers
23 views

Allow login only for one account from one device

Hi All i hope all you are ok . i am working on a membership website , and i want to prevent user from shared there paid account to other people , meaning that the registered account attached to ip so ...
0 votes
2 answers
25 views

Set redirect for need login

Hello, I have this code so when I place the [need_login] shortcode on a page, it redirects users who are not logged in to a Login page. The problem with this is the that it redirects them to the ...
0 votes
1 answer
58 views

WordPress login set cookie that survive browser exit (wp_signon function)

I've read all the relevant question here on StackExchange and I haven't found a solution. Here's the problem: I use a plugin to use Google OAUTH to login in Wordpress. All working correctly, but I can'...
0 votes
1 answer
30 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(); ...
0 votes
0 answers
16 views

Logging in to the frontend works correctly but not for WP-Admin

On my private page, I want the website to be shown only to logedin people. So if a person comes to the site, the first is displayed custom template login form. When the person log-in, the home page is ...
1 vote
0 answers
19 views

display dynamic WP Site logo on wp-admin using CSS

I'm looking for a way to always display the current site logo (as set in customiser) on the wp-admin page in place of the WP logo via CSS. I know how to manually add a custom image (code below is part ...
1 vote
3 answers
116 views

How to shutdown wordpress login temporarily

How can I disable wordpress login temporarily even for administrator users? is there any solution?
  • 11
0 votes
0 answers
15 views

Trying to re-direct users to specific page based on an ACF variable

I have a case where I have an ACF variable that is stored within a users profile and based on that variables state I need to redirect to one of two pages once the user logs in. This is just a true or ...
  • 1
0 votes
0 answers
21 views

Linking form to user meta fields

I currently have my login page set up to allow sign up through google. Immediately after a successful sign up I'm looking to set up a redirect to a form where the user can enter additional details and ...
0 votes
0 answers
48 views

Restrict users of site 1 to login in site 2 in wordpress multisite

I'd setup Wordpress Multisite. site-1: www.abc.com (is main site). site-2: www.abc.com/site2 (is a subsite). I'd setup other site in sub directory not on as a subdomain. Right now if a user register ...
0 votes
1 answer
38 views

add class to element if user is not logged in [closed]

Please help . I need to add class to this button if user is not logged in <?php echo apply_filters( 'my_order_html', '<button type="submit" class="ADD-CLASS-HERE cfw-primary-btn ...
0 votes
0 answers
12 views

How to create separate login for authors/moderators/subscribers?

I am working on a simple blog on marketing niche. However, few others have shown interest and is willing to join as authors. We know that in wordpress the importance to keep the login url unguessable. ...
0 votes
0 answers
34 views

Reset Password Limit not working

I have used Ultimate Member plugin to limit Reset Password for given user email. But it's not blocking after the given attempts. Please help me out. This is my configuration page Even after giving ...
1 vote
0 answers
45 views

wp_insert_user() function password never match

I am trying to use wp_insert_user() to add a user from the custom registration form. The user gets added to the database with a hashed password, but when the user is logged out and tries to use ...
0 votes
0 answers
15 views

URL with login details included for public members

I've come across this How can I automatically login using a URL? for providing login details within the URL for admin access. How would I modify to use variable URLs for different posts? eg. https://...
1 vote
0 answers
46 views

How to redirect on login to a specific page if a specific meta user is empty

I would like to indicate that if you do not have the first_name filled in when logging in, you will be redirected to a specific page, for example /onboarding and if the first_name field is filled, you ...
0 votes
1 answer
107 views

How to change the login-URL with function.php?

I would to change the login URL of my site from http://example.com/wp-admin to http://example.com/example. I don't wanna use a plugin for do that, so can I do that from function.php ?
  • 1
0 votes
0 answers
31 views

This code is supposed to only allow user to be authenticated if accountVerified is equal to 1, but it still allows user to be authenticated otherwise

global $user_id; global $wpdb; if(is_user_logged_in()){ header("Location:https://www.recovermenow.co.uk"); } if(!$user_id){ if($_POST){ $...
0 votes
0 answers
41 views

User not able to sign in after wp_authenticate() and wp_signon() wordpress

<?php global $user_id; global $wpdb; if(!$user_id){ if($_POST){ $username = $wpdb->escape($_POST['email']); $password = $wpdb->escape($_POST['password']); ...
0 votes
0 answers
34 views

WordPress Multisite Profile Picture Sync Error with Nextend Social Login Plugin

I am using Nextend Social Login plugin for the login and registration system of my WordPress Multisite. This plugin fetches profile pictures from Facebook accounts. Suppose there are two websites: ...
0 votes
0 answers
13 views

How to change the login page without a plugin and not only customizing logo and text around the form?

I want to customize my login form, But I don't want to use a plugin (at least if they are paying like some of them). I want to keep my header in the login form, so just customizing the form is no ...
0 votes
1 answer
46 views

Login error when username as email different to primary email

"Unknown email address. Check again or try your username." I understand a user can log in with either username or email. But when username is an email (and particularly different to the ...
  • 1
1 vote
0 answers
31 views

Does wp_login only trigger before an user signs in into the admin panel?

Saw this bit of code in a plugin: public function wp_login($user_login, $user) { Identify::create($user->ID); } Fires after the user has successfully logged in. In the doc it says that it ...
  • 13
0 votes
0 answers
17 views

ERROR: Cookies are blocked due to unexpected output (no FTP access)

I am trying to log in the WordPress of a deceased friend to remove his page, but I get the error message described in the title when trying to do so. I saw many messages advising to modify some files ...
  • 101
0 votes
0 answers
64 views

Disable redirect to homepage after successful Login, Stay on Current Page

I have built a WordPress login form using Bootstrap Modal. When logging in it redirects you to the homepage after a successful login. I want to DISABLE this redirect. I just want the page you are ...
  • 11
0 votes
0 answers
108 views

Login error " There has been a critical error on this website"

There has been a critical error on this website and I couldn't find the solution to this.
0 votes
1 answer
77 views

Prevent wp_signon redirect on failed login for ajax login

I have a custom sign up process with an ajax login if the user needs to log in (stays on the same page). I have this code in functions.php and call it with Ajax. If credentials are correct, everything ...
  • 169
0 votes
0 answers
15 views

Removing "Failed" query argument upon successful login

I'm using the following code for a custom login page, to keep people away from wp-login.php, and it almost works perfectly for what I need: /** * Custom Login Page Actions */ // Change the login url ...
0 votes
1 answer
79 views

How to redirect Subscribers on login to specific page, when logging in from a Page

I would like to redirect my Subscribers to our Member Resources page when they login, but only when they are logging in from a Page ( is_page() ). When they log in from one of our custom post types I ...
  • 11
0 votes
0 answers
39 views

Validate user login in php

Hey guys so I made a custom API for my wordpress site and i need to check if the username and passord is correct. I did it with the following code but its not working since it always returns "...

1
2 3 4 5
31