Statistics: Posted by Cristián Lávaque — June 23rd, 2011, 10:39 pm
Statistics: Posted by PseudoNyhm — June 23rd, 2011, 10:32 pm
user_can($userid, 'access_s2member_level1') // capability check
user_is($userid, 's2member_level1') // role check
$user_level = c_ws_plugin__s2member_user_access::user_access_level($user);
$user_role = c_ws_plugin__s2member_user_access::user_access_role($user);
PseudoNyhm wrote:
If so, then that makes good sense. Thanks for the clarification. I will install a test platform, including the role management plugin you suggested, to see how things are set up.
Statistics: Posted by Cristián Lávaque — June 21st, 2011, 11:39 pm
Statistics: Posted by fcp2011 — June 21st, 2011, 10:51 pm
Statistics: Posted by fcp2011 — June 21st, 2011, 10:19 pm
user_can($userid, 'access_s2member_level1') // capability check
user_is($userid, 's2member_level1') // role check
Statistics: Posted by PseudoNyhm — June 21st, 2011, 3:36 pm
Statistics: Posted by Cristián Lávaque — June 21st, 2011, 12:26 pm
Statistics: Posted by PseudoNyhm — June 21st, 2011, 11:59 am
Statistics: Posted by Cristián Lávaque — June 21st, 2011, 10:56 am
require('../blog/wp-load.php');
if (!validate_username($user)) // fail
$userid = username_exists($user);
if (is_null($userid)) // fail
if (!user_pass_ok($user,$pass)) // fail
if (!user_can($userid, 's2member_level1')) // fail
// user has run the gauntlet, signal auth accept
Statistics: Posted by PseudoNyhm — June 21st, 2011, 9:24 am
Statistics: Posted by Cristián Lávaque — June 20th, 2011, 11:42 pm
Statistics: Posted by PseudoNyhm — June 20th, 2011, 10:28 pm
Statistics: Posted by Cristián Lávaque — June 20th, 2011, 9:37 pm
Statistics: Posted by PseudoNyhm — June 20th, 2011, 9:35 am
PseudoNyhm wrote:
I am hoping not to directly access the database. For example, in phpBB, I'm able to instantiate the phpBB system, then fetch the user object (essentially from the DB, but through phpBB), then call methods such as phpbb_check_hash(..) and group_memberships(..). This does not require/incur any actual user login (no need for a current session). That's what I'm hoping for.
require('/wp-load.php');
$user_label = c_ws_plugin__s2member_user_access::user_access_label($user);
Statistics: Posted by Cristián Lávaque — June 19th, 2011, 11:34 pm
Statistics: Posted by PseudoNyhm — June 19th, 2011, 6:37 pm
Statistics: Posted by BobTabor — June 19th, 2011, 3:49 pm
Statistics: Posted by PseudoNyhm — June 19th, 2011, 3:14 pm