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
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 ...
45
votes
8answers
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'] ?
4
votes
2answers
5k views

How to use logout function on custom menu link?

All I am using wordpress custom menu, and there is one menu as Logout. I know wordpress Logout function <?php echo wp_logout_url(); ?> But how can i use it in custom menu ?
32
votes
5answers
61k 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 ...
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 ...
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] ...
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' ); }); ...
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 ...
17
votes
5answers
48k 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 ...
10
votes
3answers
25k 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 ...
15
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(){ ...
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 ...
13
votes
5answers
60k 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 ...
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 ...
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 ...
23
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 ...
11
votes
8answers
56k 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 ...
5
votes
2answers
16k 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['...
1
vote
2answers
3k views

share login/logout sessions across two installs?

I'm having some issues sharing the user sessions across two installs. (a) site on http://stolenmx.com (b) site on http://arcade.stolenmx.com I have installed B in the same database as A and I have ...
0
votes
1answer
325 views

How can I do customizations on login, registration and password recovery forms?

There are a couple of answers here basically just linking to a plugin - to be fair there are some more specific ones too. I know there are many possibilities to use different hooks for the ...
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 ...
27
votes
3answers
17k 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 ...
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 ...
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" ...
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('/...
5
votes
5answers
6k 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 = ...
5
votes
2answers
9k views

Limiting sessions to one IP at a time

On a site with premium user account subscriptions, I'd like to be able to limit logins to one computer at a time. The most straightforward way to accomplish this would be to limit by IP, but I haven't ...
2
votes
2answers
1k views

Give visitor access to password protected page/post via external script

Overview: On my site I want to do a customer area. There is a form where the visitor enters a name (e.g. "event_xyz") and a password. Only some well informed circles (participants of the event xyz who ...
3
votes
1answer
2k views

Is it possible to use a forgot password url filter?

i recently found that a login url filter is available but i can't find a solution for the forgot password as well, for the login url i use this: function custom_login_url($login_url) { return ''....
8
votes
5answers
34k 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 ...
4
votes
3answers
4k views

How to change the wp-login.php page title?

I've been using the document_title_parts hook to change the page title for some front end pages. However, this doesn't seem to work for the login, register and password management pages. How can I ...
4
votes
5answers
4k 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 ...
2
votes
1answer
11k views

How to create custom LOGIN and REGISTRATION forms?

I have developed a theme for Wordpress and I need to customize login and registrations form. At the moment, as usual, the login and the registration URL are: http://www.example.com/wp-login.php http:/...
1
vote
1answer
1k views

How can I test the login for an expired session?

I'm developing a login plugin and need to test the login form that pops up after a session has expired. I would like to see the popup appear on my request. Any hack is fine. Ideally some little ...
0
votes
1answer
979 views

Add log in link to menu in Twenty Twelve

I can't find a way to add the log in link to the new theme of WordPress, Twenty Twelve. I did find a lot of answers on the older theme, where they suggest to add some code in the functions.php file. ...
0
votes
1answer
105 views

add the user name to menu when user is logged in [closed]

i have this code but its not working it throws syntax error, unexpected '}' error function my_custom_menu_item($items, $args) { if(is_user_logged_in() && $args->theme_location == '...
-2
votes
2answers
246 views

How can I make content disappear when a user logs in?

I am working in Wordpress, and I would like to make certain elements disappear once a user logs in. How can I do this? I have social icons on my page that I positioned to the center of my menu bar at ...
11
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 ...
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 ...
4
votes
1answer
7k 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.
5
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 ...
3
votes
2answers
18k views

Auto login using Active Directory and Windows Authentication

I've been able to setup and use a couple different LDAP plugins (CoSign SSO, Simple LDAP Logon) to create new WordPress users based on the Active Directory users but it still requires them to manually ...
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]|...
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?
5
votes
2answers
5k views

Allow up to 5 Concurrent Login Sessions

I'm having trouble implementing a concurrent login check. The site needs to prevent more than 5 concurrent sessions for any particular user at one time. Example: User Matt can have 5 active ...
5
votes
5answers
1k views

How do I change the logo on the login page?

Right now, my login page shows the Wordpress logo. How do I change it to my logo?
2
votes
1answer
1k views

Show newly added posts since last user login time /date

I'm looking for a solution to create a custom loop which will only display the last added/ modified posts since the last user login to the site. It shouldn't be that complicated doesnt it ?
2
votes
2answers
5k views

How do I redirect upon login a specific user based on role?

I'd like to force a user to a specific page upon login based on their role using if ( current_user_can('contributor') ) and the main login function function wp_loginout($redirect = '', $echo = true)...
0
votes
1answer
12k views

Send reset password link to user from custom lost password form

I've been struggling searching through a bunch of tutorials with no luck. I have a custom login page and am just replacing the login form with the forgot password form on click. My issue is how to get ...