Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Verify WordPress user password via Perl

by Sinistral (Prior)
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
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2014-12-18 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (48 votes), past polls