[Resolved] Use WP 2.7.1 login code
I am trying to have login sync between WP 2.7.1 and some custom PHP code of mine.
I tried studying login related functions of WP but what all other variables will be required for creating the same login code as used in WP and with all those variables.
Any pointers & any help will be highly appreciated.
I assume you want to use an external source of authentication? If so, there’s a
wp_authenticatehook you can use to authenticate a username and/or a password. Then, you can manually log the person in, bypassing WordPress’s login screen altogether; you can also auto-create accounts for people who validate. I created a plugin that lets me authenticate against an LDAP server with a custom login screen; that way, I could tie my WordPress install into a larger database of users.
I tried and find a workaround.
I will check for cookie and if everything is ok then I will allow to pass through else I will re-direct it to wp-login.php with a hidden field “redirect_to” containing the current URL.
Now how can I read and check for cookies the right way? I can do that but is there anything that I need to know about WP in this regard.
Thanks in advance!
I read what you two wrote and maybe you could help me…as my problem seems to be linked to authentification…
I’ve just upgraded from 2.0.4 to 2.7.1. I followed the instructions, but encountered a few problems. Anyway, I’ve solved most of them, but one : I can’t edit pages.
I see the list, and underneath each title, I can only click to see the page. Whenever I create a new page, the status I get is “pending” and I’m not allowed to delete the page.
I can edit posts and approve/disaprove/erase comments, but I can’t do anything with the pages.
I have no plugin currently running and I’ve “repopulated” each folder just in case.
It seems like I don’t have that admin right anymore : how come? I’m the first and only admin !
If anyone could help… I’m getting seriously nervous (I need this for my job)
We are discussing here something different. It might be a good option for more exposure if you open a new thread for your issue.
P.S. I am unable to help as I am new to WP code too
I already did this, with little success…
sorry, I thought my problem could be solved somehow by manually logging as explained by sojweb…
thank you anyway.
I just need to know how can i read WordPress cookies if they are stored on user’s side and if its valid?
I think you can accomplish what you need through WordPress functions. I wouldn’t recommend trying to read the cookies directly. Check out these links:
First three links were definitely of great help. I have read the Codex on the 4th link is not updated to reflect the new cookie method being used since WP 2.6 so I asked here.
Apart from this how can I load the WP environment so that I can call upon WP functions from my custom pages?
Anything other than loading wp-load.php ?
- The topic ‘[Resolved] Use WP 2.7.1 login code’ is closed to new replies.