Link to home
Create AccountLog in
Avatar of ishwarjoshi
ishwarjoshi

asked on

Automatic/Integrated login to Wordpress using PHP

OK I have googled for hours and unable to find a simple example of how would I automatically login somebody into Wordpress. All the solutions are for how to integrated Wordpress login with PHPBB login etc etc.

Here's the situation:

I have written a new website in PHP. I have my own sign-up and log-in screens and my own tables. Now the client wants a Blog so we installed Wordpress. Obviously, we dont want people to sign-up twice (on the website and on the Blog section) nor do we want them to login twice.

I fixed the sign-up problem by looking at the wordpress tables and then inserting the rows in the wp_user and wp_usermeta tables.

Now comes the hard part. When a user logs into my site, I want a way via PHP to log them automatically into Wordpress. Remember, I have already created that user in Wordpress.

Please dont tell me to just drop my login table and use Wordpress login table.

Thanks.
Avatar of ishwarjoshi
ishwarjoshi

ASKER

Note. I did try to use: http://wordpress.org/support/topic/129849
But it does not work.

Another thing I found is that lets say I create a user with a password of 'abc123' then it is stored in the wp_users table as the md5 of it - e99a18c428cb38d5f260853678922e03.
But once I login the first time to WordPress through their own login screen it gets changed to - $P$963M/2aAsqDLuo2sX9UGwWC2zCN7Hn.

But that is not such a big problem since the user would never login through the Wordpress login screen. But even if the above code or any other code works, that would be nice.
SOLUTION
Avatar of kojoru
kojoru
Flag of Russian Federation image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
I see this in the header:
/wp-admin/css/ie.css?version=2.5.1
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
I am afraid I dont have the option of completely changing my login system.
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.