[wp-hackers] Use WP User Validation for Non-WP Pages
Stephen Rider
wp-hackers at striderweb.com
Mon Aug 24 20:58:31 UTC 2009
Hi --
Raj's suggestion is problematic, and if official policy, should be
deprecated.
Since wp-config.php can be in different locations, the ABSPATH set at
the end may be wrong. (Normally in WordPress ABSPATH is set before wp-
config.php is called, but that files has a bit of "if it isn't set,
set it" code at the end -- that's the problematic part if the files is
called directly.)
So a heads up to Chris, and a call to the rest of you hackers. Is
there a better way to include the WP stuff without directly including
the wp-config?
Stephen
--
Stephen Rider
http://striderweb.com/
On Aug 24, 2009, at 3:24 PM, rajasekharan wrote:
> If you include the wp-config.php file in the beginning of your php
> page, you can bring the entire wordpress API
> into scope of your script. From there you can do whatever user
> validation you need.
>
> Chris Williams wrote:
>> Let me clarify, these pages will be fully part of the site, including
>> headers/footers as required, they just won't have a "loop".
>>
>>
>>> From: Chris Williams<chris at clwill.com>
>>> Reply-To:<wp-hackers at lists.automattic.com>
>>> Date: Mon, 24 Aug 2009 10:23:37 -0700
>>> To:<wp-hackers at lists.automattic.com>
>>> Subject: [wp-hackers] Use WP User Validation for Non-WP Pages
>>>
>>> I want to have some pages on my site, mostly a WP blog, accessible
>>> to only
>>> WP logged in users. These are not WP pages, but other PHP-coded
>>> pages.
>>>
>>> Pointers to references on how to accomplish this are appreciated.
More information about the wp-hackers
mailing list