<?php
add_action ("init", "custom_capabilities_by_domain", 1);
function custom_capabilities_by_domain ()
{
if (is_user_logged_in () && current_user_can ("access_s2member_level1") && ($user = wp_get_current_user ()))
{
if (stripos ($user->user_email, "@company-a.com") !== false)
$user->add_cap ("access_s2member_ccap_company_a");
}
}
?>
Statistics: Posted by Jason Caldwell — May 18th, 2011, 1:29 am
Statistics: Posted by Cristián Lávaque — May 16th, 2011, 1:09 pm
Statistics: Posted by earthliz — May 16th, 2011, 12:56 pm