Questions tagged [login]
Refers to the act of gaining access to a WordPress site, as well as the WordPress account itself.
1,580
questions
58
votes
14
answers
56k
views
Check if wp-login is current page
How can I check if the current page is wp-login.php or wp-signup.php ?
Are there more elegant solutions than using $_SERVER['REQUEST_URI'] ?
48
votes
7
answers
115k
views
Can I programmatically login a user without a password?
I'm manually creating users programmatically, and I want to sign in the newly created user. WP makes it easy to access the hashed password, but not the plaintext version. Is there a way to use ...
34
votes
2
answers
68k
views
Is there a hook that runs after a user logs in?
I am writing a plugin that fetches some extended user info from a remote service and I need it to execute its function each time a user logs in.
Is there a hook that gets fired after login that I can ...
33
votes
7
answers
81k
views
wp_enqueue_script was called incorrectly
I don't know how but now I am getting this error :
Notice: wp_enqueue_style was called
incorrectly. Scripts and styles should not be registered or enqueued
until the wp_enqueue_scripts, ...
30
votes
8
answers
120k
views
Can't log in: "ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress."
After a server move, I'm unable to log in to my site. I get the "ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress." error when I try submitting the ...
30
votes
3
answers
125k
views
What's the easiest way to stop WP from ever logging me out
After a certain amount of time WP logs out all users and forces them to log back in again. For development environments on my local machine this is obnoxious and absolutely unnecessary.
Is there an ...
29
votes
4
answers
54k
views
Is there any way to rename or hide wp-login.php?
Any way to change the wp-login.php url? It seems insecure that everyone that's ever used Wordpress could easily see if your site is using it, and get right to the login page.
There used to be a ...
25
votes
9
answers
45k
views
How to login with email only no username?
After searching for a couple of days and reading 2 year old threads I'm having difficulty finding a solution to the problem of having users login by email only.
At first I was delighted to see ...
24
votes
9
answers
82k
views
Check if user is logged in using JQuery
I want to execute custom jquery code which shows login dialog to user if he clicks a button and he is not logged in. How could I do that?
23
votes
8
answers
64k
views
How can I redirect user after entering wrong password?
I'm using wp_login_form() to display login form in a jQuery dialog window.
If user enters wrong password, the user is taken to the backend. I don't want that. Is there a way to notify user that he ...
21
votes
3
answers
14k
views
Increase of failed login attempts, brute force attacks? [closed]
I Installed the plugin Simple Login Lockdown and since a couple of days ago the database is recording over 200 records by day.
I think that is not possible to have my site attacked by so many IP's
...
19
votes
9
answers
108k
views
Login page ERROR: Cookies are blocked due to unexpected output
I have a WordPress website that I recently discovered had this error on the login page:
ERROR: Cookies are blocked due to unexpected output. For help, please
see this documentation or try the ...
18
votes
4
answers
84k
views
Add "Logout" link to navigation menu
How can I add a link to the primary navigation menu with the class="right" attribute?
I tried to add a static link to example.com/wp-logout.php?action=logout but that leads to a logout confirmation ...
18
votes
7
answers
65k
views
Redirect user to original url after login?
I have a function that redirects users to the login page (home) if they're trying to access any other page without being logged in, here's how it works:
function restrict_access_if_logged_out(){
...
17
votes
1
answer
31k
views
Separate registration and login for different roles
I've set 2 new roles for my site using the "Members" plugin - "sellers" and "buyers".
Each role should have its own registration page and login.
A visitor can register as both a buyer and a seller ...
17
votes
4
answers
16k
views
User registration followed by automatic login
I am using a plugin modified for my purposes.
What I am after is after the user has registered for it to automatically log them in and return them to the current page. At the moment it sends them an ...
16
votes
4
answers
11k
views
SSO / authentication integration with external 'directory service'
I'm about to start working on a prototype for a client - and one of the required features is integration with an in-house user authentication / registration system.
This system will act as the ...
14
votes
2
answers
29k
views
Preventing session timeout
Not sure if this is a bug or by design, but it's damn annoying. Every so often, more so after updating the core, while in the admin section, I get booted out with the infamous "Your session has ...
13
votes
5
answers
88k
views
Redirect loop when trying to login to /wp-admin/ [duplicate]
Stuck in an infinite loop when trying to log in to my wordpress site. I type in the URL/wp-admin and then it loops me back to the regular website, not the admin login page.
I have tried with http ...
12
votes
7
answers
23k
views
Disallow user from editing their own profile information
I'm currently developing an intranet and I am using Justin Tadlock's Members plugin to control roles and capabilities.
I have created a HR role to allow Human Resources staff to create and edit user ...
12
votes
1
answer
14k
views
How reduce wordpress login session timeout time?
I want to logout user autometically when user is idle for more than 10 minutes.That mean suppose user is logged in to a site and user didn't browse any pages for more than 10 mins.when he browse any ...
12
votes
1
answer
2k
views
How to prefill WordPress registration with social details
I created custom registration process in WordPress with a lot of extra fields like first name, last name etc.
I would like to make integration with Facebook/LinkedIn so first name, last name, email, ...
11
votes
3
answers
30k
views
Check for correct username on custom login form
I have used Jeff Star's tutorial for creating my own custom login form http://digwp.com/2010/12/login-register-password-code/. It works great, but I have one problem. On the reset password form, if ...
11
votes
1
answer
3k
views
Is there a is_user_logged_in() for multisite?
Is there a is_user_logged_in() function for Wordpress MU / Multisite (3.0+) where I can add in the network site ID like is_user_logged_in(2) where 2 would be the site_id?
Update:
After a little ...
11
votes
1
answer
11k
views
How to Change the Default Home Page for the WordPress Dashboard?
Is it possible to change the Default "Home" admin page when logging into the WordPress Dashboard?
I thought about a couple of possibilities...
Substitute the content on the Dashboard home page with ...
10
votes
1
answer
6k
views
Enqueue a stylesheet for login page and make it appear in head element
I try to style the login page in my theme. Very simple:
add_action( 'login_enqueue_scripts', function()
{
wp_enqueue_style( 'TEST', get_template_directory_uri() . '/css/login.css' );
});
...
10
votes
7
answers
228k
views
I can't access my site via wp-admin
I developed a site six months ago and now need to update it, but I can't access the login page to get in to it.
I get a the following error page:
This is somewhat embarrassing...
I tried wp-...
10
votes
3
answers
7k
views
'Password field is empty' error when using autofill in Chrome
When I open the login screen on Chrome, the browser automatically fills the form with my username and password. However, when I hit the submit button, I get the following message:
ERROR: The ...
10
votes
1
answer
7k
views
Removing username from the 'wordpress_logged_in' cookie
I am working with a client with some strict security measures. After undergoing security review, we were notified that the user name stored in the logged in cookie, e.g.
wordpress_logged_in[username]|...
10
votes
1
answer
5k
views
How to show 'login error' and 'lost password' on my template page?
I'm providing front-end login in a template, using the function wp_login_form. It handles the redirection after login and logout pretty neatly! But if the username / password mismatch, or are non ...
9
votes
4
answers
37k
views
Custom login form
I am very new to WordPress. I am trying to display a login form in the header section of my website. However, when I look at all of the files in my directory it is very overwhelming and I am afraid to ...
9
votes
3
answers
12k
views
How to prefill the username/password fields on the login page
For a demo environment, I would like to pre-fill the username and password fields of the wp-login form with respectively "demo" and "demo" string.
Thus users will just need to click on the "Log-in" ...
9
votes
6
answers
32k
views
How do I require authorization / login to view a specific set of posts / pages?
I am working on a wordpress site for a client who wants an internal 'intranet' for his employees. The basic needs are:
Communicate things in-house
House important company documents
Provide quick ...
9
votes
3
answers
44k
views
How to redirect/rewrite all /wp-login requests
Is there any simple way to have wordpress, php or apache rewrite all urls which involve /wp-admin to /admin?
I have added this entry to my .htaccess file:
RewriteRule ^admin /wp-login.php [L]
...
9
votes
1
answer
15k
views
How to change "You must be logged in to post a comment."
Some of my users have mentioned that my site is confusing for them. As this is the case, I would like to actually make links to Login/Register for my unregistered visitors to quickly do so if they ...
9
votes
2
answers
4k
views
What is $interim_login?
I found an $interim_login variable within the wp-login.php file, and I'm not sure what it does or what it is. The documentation around the interwebs is pretty sparse.
What is $interim_login?
9
votes
1
answer
18k
views
Login redirect to previous page
I have a custom login page at http://netballscoop.com/log-in/
When you fill the username and password it redirects you to the previous page you were on perfectly. When you click Log Out it redirects ...
9
votes
12
answers
16k
views
Unable to login to my wordpress site. reauth=1 redirection loop
There was a similar post to this, however the solution did not work for me.
I am having some difficulty logging into my WordPress site. When I attempt to visit example.com/wp-admin, I see the login ...
8
votes
2
answers
20k
views
Prevent wp_login_form() from redirecting to wp-admin when there are errors
I have made a login form on the front-end of my site using wp_login_form(). However, when the user types in an incorrect username/password they are redirected to the wp-admin login form.
How can you ...
8
votes
5
answers
26k
views
wp_signon returns user, but the user is not logged in
I use wp_signon() and it returns a user, not an error. However when I do is_user_logged_in() it returns false.
Help would be very much appreciated :)
8
votes
1
answer
14k
views
What exactly is ReAuth?
Searching for "WordPress Reauth" and the like all result in folks who are having problems with ReAuth=1. What exactly is ReAuth?
8
votes
1
answer
2k
views
How to protect pages with double authentication: password + email (in custom field)
I would like to extend the WordPress password protection of posts by adding extra input field for user email.
So in order to see the content user will have to know the password and previously given ...
8
votes
1
answer
8k
views
Can someone explain what wp_session_tokens are, and what are they used for?
I am trying to understand how WordPress determines where a user is logged in or not? I read that it's done using just the cookies; but with WordPress 4, there's a new addition: wp_session_tokens. I ...
7
votes
3
answers
15k
views
Adding extra authentication field in login page
I am going to enhance my WordPress authentication page. My idea is that simply adding an extra field into the login page. The extra field will require user to enter personal identification code (4 to ...
7
votes
4
answers
49k
views
Redirect to referring page after logging in
I am not using any custom login plugins or any bespoke code. A few of my pages have got this bit of code in them at the very beginning.
<?php
if(!is_user_logged_in())
wp_redirect('/...
7
votes
4
answers
4k
views
Replacing the Wordpress password validation
I have a custom application with thousands of users who already have a password stored. I would like to set up a self hosted wordpress site to accompany that application and to use the usernames and ...
7
votes
2
answers
5k
views
How to check in timber if user is loggedin?
How to check if there is a user is loggedin? Normaly you do this like:
if ( is_user_logged_in() ) { // do something }
but how you do this within a Timber template? some thing like?:
{% if ...
7
votes
2
answers
16k
views
Is there a hook before the user is authenticated?
I'm looking for a hook that can be used before WP reads the DB to authenticate the user's login credentials, but can't seem to find one anywhere. Does one exist?
I tried add_filter/action('...
7
votes
1
answer
16k
views
Redirect user using the 'wp_login_failed' action hook if the error is 'empty_username' or 'empty_password'
Background
I'm attempting to make a seemless frontend login for a blog, while still leaving wp-login.php available to those users who know how to get there. wp-login.php is also required to ...
7
votes
2
answers
25k
views
wp_signon() does not authenticate user guidance needed
I use form to send POST request to a page and to login user with wp_signon() in order to authenticate user to my wordpress installation as described in WP documentation:
$creds = array();
$creds['...