Statistics: Posted by Cristián Lávaque — July 27th, 2011, 1:55 am
Statistics: Posted by solraco — July 26th, 2011, 4:28 pm
<?php
add_action ('ws_plugin__s2member_before_ip_restrictions_ok', 'levels_max_ips');
function levels_max_ips($vars = array()) {
if (is_object($user = new WP_User($username = $vars['restriction'])))
if ($user->has_cap('s2member_level1'))
$GLOBALS['WS_PLUGIN__']['s2member']['o']['max_ip_restriction'] = 2;
if ($user->has_cap('s2member_level2'))
$GLOBALS['WS_PLUGIN__']['s2member']['o']['max_ip_restriction'] = 10;
}
?>
Statistics: Posted by Cristián Lávaque — July 26th, 2011, 2:12 am
Statistics: Posted by solraco — July 25th, 2011, 12:02 pm