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
45
votes
9answers
33k 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'] ?
32
votes
5answers
62k 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 ...
27
votes
2answers
35k 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 ...
27
votes
3answers
18k 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 ...
26
votes
4answers
48k 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 ...
20
votes
3answers
12k 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 ...
17
votes
5answers
49k 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?
17
votes
6answers
27k 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 ...
17
votes
5answers
40k 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, ...
17
votes
1answer
28k 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 ...
16
votes
7answers
52k 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(){ ...
15
votes
6answers
45k 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 ...
15
votes
4answers
55k 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 ...
15
votes
4answers
8k 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
5answers
62k 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 ...
14
votes
4answers
13k 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 ...
12
votes
1answer
11k 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
8answers
57k 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 ...
12
votes
1answer
755 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
3answers
6k 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
1answer
5k 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
3answers
26k 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 ...
10
votes
1answer
4k 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 ...
10
votes
1answer
2k 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 ...
9
votes
7answers
174k 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-...
9
votes
1answer
3k 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]|...
8
votes
5answers
35k 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 ...
8
votes
3answers
8k 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" ...
8
votes
2answers
3k 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?
8
votes
1answer
8k 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 ...
8
votes
1answer
962 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
1answer
8k 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 ...
8
votes
1answer
9k 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 ...
7
votes
5answers
16k 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 ...
7
votes
3answers
12k 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
3answers
36k 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] ...
7
votes
4answers
21k 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 :)
7
votes
1answer
9k 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 ...
7
votes
0answers
2k views

Login members using web services

I want a login system which authenticate user from web services.The steps should be as follows: we have few member web sites (Outside of wordpress server). Each member website have its corresponding ...
6
votes
2answers
4k views

Make my wordpress blog remember my login “forever”

Is there a way to make Wordpress' "Remember Me" login checkbox work for a really long time, like a year? Currently I think it only works for a few days or a week max, usually I am not remembered.
6
votes
3answers
28k 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('/...
6
votes
1answer
13k 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 ...
6
votes
5answers
3k views

How can I make an Ajax login form work with FORCE_SSL_ADMIN enabled?

I'm working on a site that requires an https secured admin area and a secure front-end area as well where private information will be shown. My preference for user login is an Ajax-enabled widget that ...
6
votes
1answer
10k 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 ...
6
votes
1answer
11k 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?
6
votes
4answers
10k views

How to change the default logout link on WordPress Admin

I want to use another link for logout because I have /wp-admin/* protected with htpassword. Is there a way to do this? Something like creating a custom page like site.com/logout then use it as my new ...
6
votes
1answer
3k views

Disable WordPress 3.6 idle logout / login modal window / session expiration

I manage a WordPress site hosted at WPEngine that was recently force-upgraded to version 3.6. The upgrade introduced "In-line login following expired sessions", and therein lies the problem. The ...
6
votes
1answer
59k views

Woocommerce registration page [closed]

So...I just found out that the shortcodes for the login and registration pages are now removed from Woocommerce.... I know the forms are inside "My account" page, but I need a link in the menu to ...
6
votes
4answers
7k views

Synchronize WordPress user accounts across multiple domains and installations without using WordPress MU

As the title suggests, If you had to synchronize WordPress user accounts across multiple domains and installations without using WordPress MU how would you do it?
6
votes
5answers
7k views

How to disable autocomplete on the wp-login.php page

It looks like there is not an easy way to add autocomplete="off" to the password input on the WordPress login page without editing the wp-login.php page directly. Is there something I'm missing? I ...