Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Verify WordPress user password via Perl

by Sinistral (Monsignor)
on Dec 19, 2011 at 18:05 UTC ( #944288=note: print w/replies, xml ) Need Help??

in reply to Verify WordPress user password via Perl

The WordPress Codex function you want is wp_login_form. What you could do is create a simple one-off PHP file that includes the WordPress API file (wp-blog-header.php) and calls the function. Set the redirect URL of the wp_login_form function to be your Perl code that provides files. Or perhaps create some mishmash where your Perl code is doing the interface generation and you use something like LWP::Simple to scrape the information into a Perl string.

To be honest, I would create a custom script completely in PHP to do what you're trying to do. You could perhaps delve into the WordPress API to create a plugin that allows users to see the files you're trying to deliver. Perl, for all its power, is sometimes not the right tool for the job.

  • Comment on Re: Verify WordPress user password via Perl

Replies are listed 'Best First'.
Re^2: Verify WordPress user password via Perl
by Anonymous Monk on Dec 20, 2011 at 09:10 UTC
    Maybe this is the best solution. I'm going to try this as well. Thanks.
      Actually, in this way I believe I cannot prevent that anyone who knows the redirect link can get the files, while I want to deliver them only to WP users that have a specific permission set in WP. Or am I wrong ?

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://944288]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2023-03-21 03:45 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (59 votes). Check out past polls.