MCS has asked for the wisdom of the Perl Monks concerning the following question:
I have a webpage based on wordpress (which uses php). Using this, I can call a function to check what roles a user has based on their wordpress login. (using a wordpress cookie so I wouldn't have to add my own authentication scheme). I'm trying to add some additional functionality to this website and at first I thought I would just stick with PHP but the more I look at what I want to implement, the more I want to use some CPAN modules. I've also started to play with Mason (& mod_perl), thinking that might be the way to go. My question is, can I integrate Mason with wordpress?
For example, I can do this in PHP:
<?php include '../wp-config.php'; get_currentuserinfo(); if (current_user_can('read')) { ... }?>
Here it just checks to see if the wordpress user has the 'read' role. Is there any way to call a PHP function like this from Perl or should I just figure out how to rewrite all the wordpress user checking in perl? Any help or pointers would be greatly apreciated.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Mason & PHP
by stonecolddevin (Parson) on Feb 13, 2006 at 17:16 UTC | |
Re: Mason & PHP
by hesco (Deacon) on Feb 13, 2006 at 23:24 UTC | |
by MCS (Monk) on Feb 16, 2006 at 17:27 UTC | |
Re: Mason & PHP
by dorward (Curate) on Feb 13, 2006 at 17:48 UTC | |
Re: Mason & PHP
by Arunbear (Prior) on Feb 13, 2006 at 19:56 UTC |