SILENT KILLERPanel

Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > plugins > members > inc > >


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/codekrsu//ameliagraphics.com/wp-content/plugins/members/inc//

NameTypeSizeLast ModifiedActions
class-cap-group.php File 2592 bytes November 30 2024 06:41:08.
class-capability.php File 1407 bytes November 30 2024 06:41:08.
class-registry.php File 2500 bytes November 30 2024 06:41:08.
class-role-group.php File 2065 bytes November 30 2024 06:41:08.
class-role.php File 3810 bytes November 30 2024 06:41:08.
class-widget-login.php File 12414 bytes November 30 2024 06:41:08.
class-widget-users.php File 11607 bytes November 30 2024 06:41:08.
functions-admin-bar.php File 1048 bytes November 30 2024 06:41:08.
functions-cap-groups.php File 7404 bytes November 30 2024 06:41:08.
functions-capabilities.php File 18038 bytes November 30 2024 06:41:08.
functions-content-permissions.php File 10136 bytes December 12 2024 21:24:26.
functions-deprecated.php File 10829 bytes November 30 2024 06:41:08.
functions-options.php File 3741 bytes December 10 2024 22:11:14.
functions-private-site.php File 6648 bytes November 30 2024 06:41:08.
functions-role-groups.php File 2635 bytes November 30 2024 06:41:08.
functions-roles.php File 10516 bytes November 30 2024 06:41:08.
functions-shortcodes.php File 10369 bytes May 21 2025 02:04:48.
functions-users.php File 3865 bytes November 30 2024 06:41:08.
functions-widgets.php File 986 bytes November 30 2024 06:41:08.
functions.php File 930 bytes November 30 2024 06:41:08.
template.php File 5161 bytes November 30 2024 06:41:08.

Reading File: /home/codekrsu//ameliagraphics.com/wp-content/plugins/members/inc///functions-users.php

<?php
/**
 * User-related functions and filters.
 *
 * @package    Members
 * @subpackage Includes
 * @author     The MemberPress Team 
 * @copyright  Copyright (c) 2009 - 2018, The MemberPress Team
 * @link       https://members-plugin.com/
 * @license    http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 */

// Filter `user_has_cap` if denied caps should take precedence.
if ( members_explicitly_deny_caps() ) {
	add_filter( 'user_has_cap', 'members_user_has_cap_filter', 10, 4 );
}

/**
 * Filter on `user_has_cap` to explicitly deny caps if there are conflicting caps when a
 * user has multiple roles.  WordPress doesn't consistently handle two or more roles that
 * have the same capability but a conflict between being granted or denied.  Core WP
 * merges the role caps so that the last role the user has will take precedence.  This
 * has the potential for granting permission for things that a user shouldn't have
 * permission to do.
 *
 * @since  1.0.0
 * @access public
 * @param  array  $allcaps
 * @param  array  $caps
 * @param  array  $args
 * @param  object $user
 * @return array
 */
function members_user_has_cap_filter( $allcaps, $caps, $args, $user ) {

	// If the user doesn't have more than one role, bail.
	if ( 1 >= count( (array) $user->roles ) )
		return $allcaps;

	// Get the denied caps.
	$denied_caps = array_keys( (array) $allcaps, false );

	// Loop through the user's roles and find any denied caps.
	foreach ( (array) $user->roles as $role ) {

		// Get the role object.
		$role_obj = get_role( $role );

		// If we have an object, merge it's denied caps.
		if ( ! is_null( $role_obj ) ) {
			$denied_caps = array_merge(
				(array) $denied_caps,
				array_keys( (array) $role_obj->capabilities, false )
			);
		}
	}

	// If there are any denied caps, make sure they take precedence.
	if ( $denied_caps ) {

		foreach ( $denied_caps as $denied_cap ) {
			$allcaps[ $denied_cap ] = false;
		}
	}

	// Return all the user caps.
	return $allcaps;
}

/**
 * Conditional tag to check whether a user has a specific role.
 *
 * @since  1.0.0
 * @access public
 * @param  int           $user_id
 * @param  string|array  $roles
 * @return bool
 */
function members_user_has_role( $user_id, $roles ) {

	$user = new WP_User( $user_id );

	foreach ( (array) $roles as $role ) {

		if ( in_array( $role, (array) $user->roles ) )
			return true;
	}

	return false;
}

/**
 * Conditional tag to check whether the currently logged-in user has a specific role.
 *
 * @since  1.0.0
 * @access public
 * @param  string|array  $roles
 * @return bool
 */
function members_current_user_has_role( $roles ) {

	return is_user_logged_in() ? members_user_has_role( get_current_user_id(), $roles ) : false;
}

/**
 * Wrapper for `current_user_can()` that checks if the user can perform any action.
 * Accepts an array of caps instead of a single cap.
 *
 * @since  2.0.0
 * @access public
 * @param  array   $caps
 * @return bool
 */
function members_current_user_can_any( $caps = array() ) {

	foreach ( $caps as $cap ) {

		if ( current_user_can( $cap ) )
			return true;
	}

	return false;
}

/**
 * Wrapper for `current_user_can()` that checks if the user can perform all actions.
 * Accepts an array of caps instead of a single cap.
 *
 * @since  2.0.0
 * @access public
 * @param  array   $caps
 * @return bool
 */
function members_current_user_can_all( $caps = array() ) {

	foreach ( $caps as $cap ) {

		if ( ! current_user_can( $cap ) )
			return false;
	}

	return true;
}

/**
 * Returns an array of the role names a user has.
 *
 * @since  1.0.0
 * @access public
 * @param  int    $user_id
 * @return array
 */
function members_get_user_role_names( $user_id ) {

	$user = new WP_User( $user_id );

	$names = array();

	foreach ( $user->roles as $role )
		$names[ $role ] = members_get_role( $role )->get( 'label' );

	return $names;
}

SILENT KILLER Tool