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
50
votes
10answers
40k 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'] ?
40
votes
6answers
79k 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 ...
30
votes
2answers
46k 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 ...
29
votes
3answers
52k 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 ...
27
votes
4answers
50k 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
6answers
54k 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, ...
23
votes
6answers
61k 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?
21
votes
6answers
33k 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 ...
21
votes
3answers
13k 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 ...
20
votes
7answers
51k 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 ...
18
votes
5answers
85k 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 ...
17
votes
6answers
66k 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 ...
17
votes
7answers
59k 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
1answer
29k 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
9answers
73k 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 ...
16
votes
4answers
14k 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 ...
15
votes
4answers
9k 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 ...
12
votes
1answer
12k 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
1answer
1k 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
27k 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
1answer
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 ...
10
votes
1answer
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
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

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
1answer
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
5answers
56k 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 ...
9
votes
7answers
210k 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
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?
9
votes
1answer
10k 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
1answer
10k 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 ...
8
votes
5answers
18k 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 ...
8
votes
3answers
9k 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
1answer
12k 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
1k 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
16k 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
4answers
27k 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 ...
7
votes
3answers
13k 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
4answers
3k 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
1answer
15k 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 ...
7
votes
6answers
22k 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 ...
7
votes
3answers
39k 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
23k 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
12k 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
1answer
12k 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?
7
votes
5answers
8k views

WordPress auto login after registration not working

I looked up a bunch of threads trying to figure out how to automatically log a user in after registration, and came up with this. function automatically_log_me_in( $user_id ) { $user = ...
7
votes
1answer
4k views

Adding “Remember Me” in custom login

im currently using an ajax login i found here: http://wpsites.org/wordpress-ajax-login-and-register-without-a-plugin-10835/ Everything works perfectly fine. However i'd like to add a "REMEMBER ME" ...
7
votes
2answers
2k views

wp_set_auth_cookie() doesn't work in Ajax call

I am trying to create a Facebook JS-SDK based auto login feature. When user is "Connected" passing FbID and aother user data to an ajax function which creates the session cookie. Cookie is created (I ...
7
votes
1answer
2k views

Login members using web services

I want a login system which authenticates users from web services.The steps should be as follows: We have some member web sites (Outside of WordPress server). Each member website has its ...
6
votes
1answer
8k views

check first time login only

i want to display welcome message or redirect the user to my custom template when the user login for the first time only. After the user can visit the regular page of the site.
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.

1
2 3 4 5
29