Community Support Forums — WordPress® ( Users Helping Users ) — 2011-12-20T09:50:31-05:00 http://www.primothemes.com/forums/feed.php?f=40&t=13088 2011-12-20T09:50:31-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13088&p=57824#p57824 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\user-securities.inc.php
Docs updated: December 20, 2011, 9:50 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — December 20th, 2011, 9:50 am


]]>
2011-12-07T01:03:38-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13088&p=55506#p55506 <![CDATA[s2Member v111206 / Source Code: s2member\i...]]>
s2Member v111206
Source Code: s2member\includes\classes\user-securities.inc.php
Docs updated: December 7, 2011, 1:03 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — December 7th, 2011, 1:03 am


]]>
2011-11-05T19:26:26-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13088&p=51880#p51880 <![CDATA[s2Member v111105 / Source Code: s2member\i...]]>
s2Member v111105
Source Code: s2member\includes\classes\user-securities.inc.php
Docs updated: November 5, 2011, 8:26 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — November 5th, 2011, 7:26 pm


]]>
2011-10-29T20:35:26-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13088&p=49975#p49975 <![CDATA[s2Member v111029 / Source Code: s2member\i...]]>
s2Member v111029
Source Code: s2member\includes\classes\user-securities.inc.php
Docs updated: October 29, 2011, 9:35 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 29th, 2011, 8:35 pm


]]>
2011-10-17T15:39:33-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13088&p=47769#p47769 <![CDATA[s2Member v111017 / Source Code: s2member\i...]]>
s2Member v111017
Source Code: s2member\includes\classes\user-securities.inc.php
Docs updated: October 17, 2011, 1:39 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 17th, 2011, 3:39 pm


]]>
2011-10-11T14:35:30-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13088&p=46170#p46170 <![CDATA[s2Member v111011 / Source Code: s2member\i...]]>
s2Member v111011
Source Code: s2member\includes\classes\user-securities.inc.php
Docs updated: October 11, 2011, 12:35 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 11th, 2011, 2:35 pm


]]>
2011-10-03T15:47:54-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13088&p=44300#p44300 <![CDATA[s2Member v111003 / Source Code: s2member\i...]]>
s2Member v111003
Source Code: s2member\includes\classes\user-securities.inc.php
Docs updated: October 3, 2011, 1:47 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 3rd, 2011, 3:47 pm


]]>
2011-10-03T03:41:27-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13088&p=43007#p43007 <![CDATA[s2Member v111002 / Source Code: s2member\i...]]>
s2Member v111002
Source Code: s2member\includes\classes\user-securities.inc.php
Docs updated: October 3, 2011, 1:41 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 3rd, 2011, 3:41 am


]]>
2011-09-27T05:26:52-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13088&p=41253#p41253 <![CDATA[s2Member v110927 / Source Code: s2member\i...]]>
s2Member v110927
Source Code: s2member\includes\classes\user-securities.inc.php
Docs updated: September 27, 2011, 3:26 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 27th, 2011, 5:26 am


]]>
2011-09-26T21:03:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13088&p=40009#p40009 <![CDATA[s2Member v110926 / Source Code: s2member\i...]]>
s2Member v110926
Source Code: s2member\includes\classes\user-securities.inc.php
Docs updated: September 26, 2011, 7:03 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 26th, 2011, 9:03 pm


]]>
2011-09-17T16:20:53-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13088&p=38151#p38151 <![CDATA[s2Member v110915 / Source Code: s2member\i...]]>
s2Member v110915
Source Code: s2member\includes\classes\user-securities.inc.php
Docs updated: September 17, 2011, 2:21 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 17th, 2011, 4:20 pm


]]>
2011-09-14T01:28:04-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13088&p=36732#p36732 <![CDATA[s2Member v110913 / Source Code: s2member\i...]]>
s2Member v110913
Source Code: s2member\includes\classes\user-securities.inc.php
Docs updated: September 13, 2011, 11:28 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 14th, 2011, 1:28 am


]]>
2011-09-13T12:03:10-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13088&p=35460#p35460 <![CDATA[s2Member v110912 / Source Code: s2member\i...]]>
s2Member v110912
Source Code: s2member\includes\classes\user-securities.inc.php
Docs updated: September 13, 2011, 10:03 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 13th, 2011, 12:03 pm


]]>
2011-08-15T15:14:23-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13088&p=31581#p31581 <![CDATA[s2Member v110815 / Source Code: s2member\i...]]>
s2Member v110815
Source Code: s2member\includes\classes\user-securities.inc.php
Docs updated: August 15, 2011, 4:14 pm

Open for public discussion.
(!-- s-words :: --)Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code jQuery(window).load(function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli'+location.hash).addClass('hilite'); }); jQuery(window).bind('hashchange', function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli').removeClass('hilite'); jQuery('olli'+location.hash).addClass('hilite'); }); [ full view ]s2member\includes\classes\user-securities.inc.php ?php /** * User securities. * * Copyright: © 2009-2011 * {@link http://www.websharks-inc.com/ WebSharks, Inc.} * ( coded in the USA ) * * Released under the terms of the GNU General Public License. * You should have received a copy of the GNU General Public License, * along with this software. In the main directory, see: /licensing/ * If not, see: {@link http://www.gnu.org/licenses/}. * * @package s2Member\User_Securities * @since 3.5 */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_user_securities" ) ) { /** * User securities. * * @package s2Member\User_Securities * @since 3.5 */ class c_ws_plugin__s2member_user_securities { /** * Initializes Filter for `user_has_cap`. * * It's very important that this is NOT attached before WordPress® creates `$current_user` via `$wp-init()`. * This prevents crashes when other plugins attempt to call upon `current_user_can()` before WordPress is initialized. * For instance, some plugins attempt to use `current_user_can()` on the `plugins_loaded` Hook, which they should not do. * * @package s2Member\User_Securities * @since 3.5 * * @attaches-to: ``add_action("init");`` * * @return null */ public static function initialize ( ) /* Initializes the Filter for `user_has_cap`. */ { add_filter ( "user_has_cap" , "c_ws_plugin__s2member_user_securities::user_capabilities" , 10 , 3 ) ; } /** * Alters `WP_User-has_cap()` in special cases for Administrators. * * @package s2Member\User_Securities * @since 110815 * * @attaches-to: ``add_filter("user_has_cap");`` * * @param array $capabilities Expects an array of Capabilities passed in by the Filter. * This array contains all of the Capabilities that the User has *( i.e. ``$user-allcaps`` )*. * @param array $caps_map An array of Capabilities mapped out by the ``map_meta_cap`` function. * @param array $args Array of arguments originally passed through the ``has_cap()`` function. * However, WordPress® modifies this array of arguments in the following way. * Argument `[0]` is the Capability test string itself *( this is normal )*. * Argument `[1]` is added by WordPress®; it's the ID of the User. * Other arguments starting from array index `[2]` are normal. * @return array An array of Capabilities. */ public static function user_capabilities ( $capabilities = FALSE , $caps_map = FALSE , $args = FALSE ) { eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_user_capabilities" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ if ( ! is_multisite ( ) && ! empty ( $capabilities [ "administrator" ] ) && ! empty ( $args [ 0 ] ) && preg_match ( "/^access_s2member_ccap_/i" , $args [ 0 ] ) && apply_filters ( "ws_plugin__s2member_admins_have_all_ccaps" , true , get_defined_vars ( ) ) ) $capabilities = array_merge ( ( array ) $capabilities , array ( $args [ 0 ] = 1 ) ) ; /**/ else if ( is_multisite ( ) && c_ws_plugin__s2member_utils_conds:: is_multisite_farm ( ) && ( is_super_admin ( ) || ! empty ( $capabilities [ "administrator" ] ) ) && ! empty ( $args [ 0 ] ) && ( $args [ 0 ] === "edit_user" || $args [ 0 ] === "edit_users" ) ) if ( $args [ 0 ] === "edit_users" || ( $args [ 0 ] === "edit_user" && ! empty ( $args [ 2 ] ) && ( ( ! empty ( $args [ 1 ] ) && (int) $args [ 1 ] === (int) $args [ 2 ] ) || is_user_member_of_blog ( $args [ 2 ] ) ) ) ) $capabilities = array_merge ( ( array ) $capabilities , array ( "edit_users" = 1 ) ) ; /**/ return apply_filters ( "ws_plugin__s2member_user_capabilities" , $capabilities , get_defined_vars ( ) ) ; } /** * Alters this Filter inside `/wp-admin/user-edit.php`. * * @package s2Member\User_Securities * @since 3.5 * * @attaches-to: ``add_filter("enable_edit_any_user_configuration");`` * * @param bool $allow Expects boolean value passed through by the Filter. * @return bool True if the current User is allowed to edit any User, else existing value. */ public static function ms_allow_edits ( $allow = FALSE ) { global $user_id ; /* Available inside `/wp-admin/user-edit.php`. */ /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_ms_allow_edits" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ if ( is_multisite ( ) && c_ws_plugin__s2member_utils_conds:: is_multisite_farm ( ) ) if ( is_super_admin ( ) || ( current_user_can ( "administrator" ) && $user_id && is_user_member_of_blog ( $user_id ) ) ) $allow = true ; /* Yes, allow Administrators to edit User Profiles. */ /**/ return apply_filters ( "ws_plugin__s2member_ms_allow_edits" , $allow , get_defined_vars ( ) ) ; } /** * Hides Password fields for Demo Users; and deals with Password fields on Multisite Blog Farms. * * Demo accounts *( where the Username MUST be "demo" )*, will NOT be allowed to change their Password. * Any other restrictions you need to impose must be done through custom programming, using s2Member's Conditionals. * See `s2Member - API Scripting`. * * @package s2Member\User_Securities * @since 3.5 * * @attaches-to: ``add_filter("show_password_fields");`` * * @param bool $show Expects boolean value passed through by the Filter. * @param obj $user Expects a `WP_User` object passed through by the Filter. * @return bool False if the Password is locked for this User, else existing value. */ public static function hide_password_fields ( $show = TRUE , $user = FALSE ) { eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_hide_password_fields" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ if ( $show && is_multisite ( ) && c_ws_plugin__s2member_utils_conds:: is_multisite_farm ( ) ) if ( ! is_super_admin ( ) && is_object ( $user ) && ! empty ( $user - ID ) && is_object ( $current_user = wp_get_current_user ( ) ) && ! empty ( $current_user - ID ) ) if ( $user - ID !== $current_user - ID ) $show = false ; /**/ if ( $show && is_object ( $user ) && ! empty ( $user - ID ) && $user - user_login === "demo" ) $show = false ; /* Lock Password on Demos. */ /**/ return apply_filters ( "ws_plugin__s2member_hide_password_fields" , $show , get_defined_vars ( ) ) ; } } } ? [ full view ]s2member\includes\classes\user-securities.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

Statistics: Posted by System Robot — August 15th, 2011, 3:14 pm


]]>
2011-07-11T17:30:19-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13088&p=27751#p27751 <![CDATA[s2Member v110710 / Source Code: s2member\i...]]>
s2Member v110710
Source Code: s2member\includes\classes\user-securities.inc.php
Docs updated: July 11, 2011, 6:30 pm

Open for public discussion.
(!-- s-words :: --)Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code jQuery(window).load(function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli'+location.hash).addClass('hilite'); }); jQuery(window).bind('hashchange', function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli').removeClass('hilite'); jQuery('olli'+location.hash).addClass('hilite'); }); [ full view ]s2member\includes\classes\user-securities.inc.php ?php /** * User securities. * * Copyright: © 2009-2011 * {@link http://www.websharks-inc.com/ WebSharks, Inc.} * ( coded in the USA ) * * Released under the terms of the GNU General Public License. * You should have received a copy of the GNU General Public License, * along with this software. In the main directory, see: /licensing/ * If not, see: {@link http://www.gnu.org/licenses/}. * * @package s2Member\User_Securities * @since 3.5 */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_user_securities" ) ) { /** * User securities. * * @package s2Member\User_Securities * @since 3.5 */ class c_ws_plugin__s2member_user_securities { /** * Initializes a Multisite Filter for `user_has_cap`. * * It's very important that this is NOT attached before WordPress® creates `$current_user` via `$wp-init()`. * This prevents crashes when other plugins attempt to call upon `current_user_can()` before WordPress is initialized. * For instance, some plugins attempt to use `current_user_can()` on the `plugins_loaded` Hook, which they should not do. * * @package s2Member\User_Securities * @since 3.5 * * @attaches-to: ``add_action("init");`` * * @return null */ public static function initialize ( ) /* Initializes the Filter for `user_has_cap`. */ { add_filter ( "user_has_cap" , "c_ws_plugin__s2member_user_securities::ms_user_capabilities" , 10 , 3 ) ; } /** * Alters `WP_User-has_cap()` on a Multisite Blog Farm. * * @package s2Member\User_Securities * @since 3.5 * * @attaches-to: ``add_filter("user_has_cap");`` * * @param array $capabilities Expects an array of Capabilities passed in by the Filter. * This array contains all of the Capabilities that the User has *( i.e. ``$user-allcaps`` )*. * @param array $caps_map An array of Capabilities mapped out by the ``map_meta_cap`` function. * @param array $args Array of arguments originally passed through the ``has_cap()`` function. * However, WordPress® modifies this array of arguments in the following way. * Argument `[0]` is the Capability test string itself *( this is normal )*. * Argument `[1]` is added by WordPress®; it's the ID of the User. * Other arguments starting from array index `[2]` are normal. * @return array An array of Capabilities. */ public static function ms_user_capabilities ( $capabilities = FALSE , $caps_map = FALSE , $args = FALSE ) { eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_ms_user_capabilities" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ if ( is_multisite ( ) && c_ws_plugin__s2member_utils_conds:: is_multisite_farm ( ) && ( is_super_admin ( ) || ! empty ( $capabilities [ "administrator" ] ) ) && ! empty ( $args [ 0 ] ) && ( $args [ 0 ] === "edit_user" || $args [ 0 ] === "edit_users" ) ) if ( $args [ 0 ] === "edit_users" || ( $args [ 0 ] === "edit_user" && ! empty ( $args [ 2 ] ) && ( ( ! empty ( $args [ 1 ] ) && (int) $args [ 1 ] === (int) $args [ 2 ] ) || is_user_member_of_blog ( $args [ 2 ] ) ) ) ) $capabilities = array_merge ( ( array ) $capabilities , array ( "edit_users" = 1 , "do_not_allow" = 1 ) ) ; /**/ return apply_filters ( "ws_plugin__s2member_ms_user_capabilities" , $capabilities , get_defined_vars ( ) ) ; } /** * Alters this Filter inside `/wp-admin/user-edit.php`. * * @package s2Member\User_Securities * @since 3.5 * * @attaches-to: ``add_filter("enable_edit_any_user_configuration");`` * * @param bool $allow Expects boolean value passed through by the Filter. * @return bool True if the current User is allowed to edit any User, else existing value. */ public static function ms_allow_edits ( $allow = FALSE ) { global $user_id ; /* Available inside `/wp-admin/user-edit.php`. */ /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_ms_allow_edits" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ if ( is_multisite ( ) && c_ws_plugin__s2member_utils_conds:: is_multisite_farm ( ) ) if ( is_super_admin ( ) || ( current_user_can ( "administrator" ) && $user_id && is_user_member_of_blog ( $user_id ) ) ) $allow = true ; /* Yes, allow Administrators to edit User Profiles. */ /**/ return apply_filters ( "ws_plugin__s2member_ms_allow_edits" , $allow , get_defined_vars ( ) ) ; } /** * Hides Password fields for Demo Users; and deals with Password fields on Multisite Blog Farms. * * Demo accounts *( where the Username MUST be "demo" )*, will NOT be allowed to change their Password. * Any other restrictions you need to impose must be done through custom programming, using s2Member's Conditionals. * See `s2Member - API Scripting`. * * @package s2Member\User_Securities * @since 3.5 * * @attaches-to: ``add_filter("show_password_fields");`` * * @param bool $show Expects boolean value passed through by the Filter. * @param obj $user Expects a `WP_User` object passed through by the Filter. * @return bool False if the Password is locked for this User, else existing value. */ public static function hide_password_fields ( $show = TRUE , $user = FALSE ) { eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_hide_password_fields" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ if ( $show && is_multisite ( ) && c_ws_plugin__s2member_utils_conds:: is_multisite_farm ( ) ) if ( ! is_super_admin ( ) && is_object ( $user ) && $user - ID && is_object ( $current_user = wp_get_current_user ( ) ) && $current_user - ID ) if ( $user - ID !== $current_user - ID ) $show = false ; /**/ if ( $show && is_object ( $user ) && $user - ID && $user - user_login === "demo" ) $show = false ; /* Lock Password on Demos. */ /**/ return apply_filters ( "ws_plugin__s2member_hide_password_fields" , $show , get_defined_vars ( ) ) ; } } } ? [ full view ]s2member\includes\classes\user-securities.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

Statistics: Posted by System Robot — July 11th, 2011, 5:30 pm


]]>
2011-07-09T06:10:21-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13088&p=25383#p25383 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\user-securities.inc.php
Docs updated: December 20, 2011, 9:50 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — July 9th, 2011, 6:10 am


]]>