Community Support Forums — WordPress® ( Users Helping Users ) — 2011-07-30T23:03:25-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=14286 2011-07-30T23:03:25-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14286&p=29506#p29506 <![CDATA[Re: Limiting access to a form/php]]> WP Admin -> s2Member -> API / Scripting -> Simple/Shortcode Conditionals and Advanced/PHP Conditionals

And the do_something_spiffy script can be inside a WordPress page with Exec PHP installed, then you'll have the WP and s2Member functions available. https://wordpress.org/extend/plugins/exec-php/

Statistics: Posted by Cristián Lávaque — July 30th, 2011, 11:03 pm


]]>
2011-07-30T12:24:02-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14286&p=29492#p29492 <![CDATA[Limiting access to a form/php]]>
<form action="do_something_spiffy.php" method="get">

to only function for logged in members. I've tried putting the php script within the s2member-files/access-s2member-level1 directory, but this resulted in a nasty error message even for logged-in members.

Also, the php script evidently is beyond the scope of being able to use functions such as
if (is_user_logged_in()) { // do spiffy stuff }
so I can't embed code into the php script to check the user's status.

Does anybody have any suggestions for how to achieve what I'd like to accomplish?

Thanks,

- David.

Statistics: Posted by dapike — July 30th, 2011, 12:24 pm


]]>