Statistics: Posted by Jason Caldwell — November 17th, 2011, 11:15 am
Statistics: Posted by holowan — November 15th, 2011, 3:01 pm
Statistics: Posted by Jason Caldwell — November 8th, 2011, 5:39 pm
<?php
add_action ("ws_plugin__s2member_before_ip_restrictions_ok", "s2_dynamic_ip_controller");
function s2_dynamic_ip_controller ($vars = array ())
{
if (($username = $vars["restriction"]) && is_object ($user = new WP_User ($username)) && isset ($user->ID) && ($user_id = $user->ID))
{
if (c_ws_plugin__s2member_user_access::user_access_level ($user) === 2) /* Is Level#2 ( indicating site license for 50 seats ). */
{
$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["max_ip_restriction"] = "50"; /* Allow up to 50 unique IP addresses. */
}
else if (c_ws_plugin__s2member_user_access::user_access_level ($user) === 3) /* Is Level#3 ( indicating site license for 100 seats ). */
{
$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["max_ip_restriction"] = "100"; /* Allow up to 100 unique IP addresses. */
}
}
}
?>
<?php
add_action ("ws_plugin__s2member_before_ip_restrictions_ok", "s2_dynamic_ip_controller");
function s2_dynamic_ip_controller ($vars = array ())
{
if (($username = $vars["restriction"]) && is_object ($user = new WP_User ($username)) && isset ($user->ID) && ($user_id = $user->ID))
{
if (c_ws_plugin__s2member_user_access::user_access_level ($user) === 0) /* Is Subscriber */
{
$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["max_ip_restriction"] = "99999999999999"; /* Allow up to 99999999999 unique IP addresses. */
}
}
}
?>
Statistics: Posted by xberserker — November 8th, 2011, 8:46 am
<?php
add_action ("init", "disable_s2_profile_mods", 1);
function disable_s2_profile_mods ()
{
if (!empty ($_GET["s2member_profile"]) || !empty ($_POST["ws_plugin__s2member_profile_save"]))
if (current_user_is ("s2member_level2") /* Disable for Level #2 Members here. */)
exit ("Profile modifications are not possible for your account.");
}
/**/
add_filter ("ws_plugin__s2member_sc_profile", "disable_s2_profile_shortcode");
function disable_s2_profile_shortcode ($code)
{
if (current_user_is ("s2member_level2") /* Disable [s2Member-Profile /] Shortcode. */)
return /* Disable for Level #2 Members here. */ false;
return /* Else return Shortcode output by default. */ $code;
}
?>
Statistics: Posted by Jason Caldwell — October 20th, 2011, 2:57 pm
Statistics: Posted by holowan — October 18th, 2011, 10:13 am
Statistics: Posted by Jason Caldwell — September 14th, 2011, 10:17 am
Statistics: Posted by holowan — September 14th, 2011, 5:23 am
<?php
add_action ("ws_plugin__s2member_before_ip_restrictions_ok", "s2_dynamic_ip_controller");
function s2_dynamic_ip_controller ($vars = array ())
{
if (($username = $vars["restriction"]) && is_object ($user = new WP_User ($username)) && isset ($user->ID) && ($user_id = $user->ID))
{
if (c_ws_plugin__s2member_user_access::user_access_level ($user) === 2) /* Is Level#2 ( indicating site license for 50 seats ). */
{
$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["max_ip_restriction"] = "50"; /* Allow up to 50 unique IP addresses. */
}
else if (c_ws_plugin__s2member_user_access::user_access_level ($user) === 3) /* Is Level#3 ( indicating site license for 100 seats ). */
{
$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["max_ip_restriction"] = "100"; /* Allow up to 100 unique IP addresses. */
}
}
}
?>
Statistics: Posted by Jason Caldwell — September 13th, 2011, 2:13 pm
Statistics: Posted by holowan — September 10th, 2011, 6:08 am
Statistics: Posted by Cristián Lávaque — September 10th, 2011, 12:58 am
Statistics: Posted by holowan — September 9th, 2011, 6:27 am
Statistics: Posted by Cristián Lávaque — September 9th, 2011, 1:44 am
Statistics: Posted by holowan — September 8th, 2011, 3:55 pm
Statistics: Posted by holowan — September 8th, 2011, 2:56 pm