✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ webm004.cluster127.gra.hosting.ovh.net ​🇻​♯➤ 6.18.42-ovh-vps-grsec-zfs+ #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 54.36.91.62 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.223
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ _dyuweyrj4,_dyuweyrj4r,dl

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/docteuh/www/Authentication//Has_Connected_Admins.php
<?php
/**
 * Class Google\Site_Kit\Core\Authentication\Has_Connected_Admins
 *
 * @package   Google\Site_Kit\Core\Authentication
 * @copyright 2021 Google LLC
 * @license   https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
 * @link      https://sitekit.withgoogle.com
 */

namespace Google\Site_Kit\Core\Authentication;

use Google\Site_Kit\Core\Authentication\Clients\OAuth_Client;
use Google\Site_Kit\Core\Storage\Options_Interface;
use Google\Site_Kit\Core\Storage\Setting;
use Google\Site_Kit\Core\Storage\User_Options_Interface;
use WP_User;

/**
 * Has_Connected_Admins class.
 *
 * @since 1.14.0
 * @access private
 * @ignore
 */
class Has_Connected_Admins extends Setting {

	/**
	 * The option_name for this setting.
	 */
	const OPTION = 'googlesitekit_has_connected_admins';

	/**
	 * User options instance implementing User_Options_Interface.
	 *
	 * @since 1.14.0
	 * @var User_Options_Interface
	 */
	protected $user_options;

	/**
	 * Constructor.
	 *
	 * @since 1.14.0
	 *
	 * @param Options_Interface      $options      Options instance.
	 * @param User_Options_Interface $user_options User options instance.
	 */
	public function __construct( Options_Interface $options, User_Options_Interface $user_options ) {
		parent::__construct( $options );
		$this->user_options = $user_options;
	}

	/**
	 * Registers the setting in WordPress.
	 *
	 * @since 1.14.0
	 */
	public function register() {
		parent::register();

		$access_token_meta_key = $this->user_options->get_meta_key( OAuth_Client::OPTION_ACCESS_TOKEN );

		add_action(
			'added_user_meta',
			function ( $mid, $uid, $meta_key ) use ( $access_token_meta_key ) {
				if ( $meta_key === $access_token_meta_key && user_can( $uid, 'administrator' ) ) {
					$this->set( true );
				}
			},
			10,
			3
		);

		add_action(
			'deleted_user_meta',
			function ( $mid, $uid, $meta_key ) use ( $access_token_meta_key ) {
				if ( $meta_key === $access_token_meta_key ) {
					$this->delete();
				}
			},
			10,
			3
		);
	}

	/**
	 * Gets the value of the setting. If the option is not set yet, it pulls connected
	 * admins from the database and sets the option.
	 *
	 * @since 1.14.0
	 *
	 * @return boolean TRUE if the site kit already has connected admins, otherwise FALSE.
	 */
	public function get() {
		// If the option doesn't exist, query the fresh value, set it and return it.
		if ( ! $this->has() ) {
			$users                = $this->query_connected_admins();
			$has_connected_admins = count( $users ) > 0;

			$this->set( (int) $has_connected_admins );

			return $has_connected_admins;
		}

		return (bool) parent::get();
	}

	/**
	 * Queries connected admins and returns an array of connected admin IDs.
	 *
	 * @since 1.14.0
	 *
	 * @return array The array of connected admin IDs.
	 */
	protected function query_connected_admins() {
		return get_users(
			array(
				'meta_key'     => $this->user_options->get_meta_key( OAuth_Client::OPTION_ACCESS_TOKEN ), // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key
				'meta_compare' => 'EXISTS',
				'role'         => 'administrator',
				'number'       => 1,
				'fields'       => 'ID',
			)
		);
	}

	/**
	 * Gets the expected value type.
	 *
	 * @since 1.14.0
	 *
	 * @return string The type name.
	 */
	protected function get_type() {
		return 'boolean';
	}

}


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
23 Sep 2026 3.15 AM
docteuh / users
0777
Clients
--
12 Sep 2026 3.15 AM
docteuh / users
0755
Exception
--
22 Sep 2026 9.13 PM
docteuh / users
0755
User_Surveys
--
11 Sep 2026 10.00 PM
docteuh / users
0755
application
--
30 Aug 2026 3.36 PM
docteuh / users
0755
cardo
--
10 Sep 2026 6.19 PM
docteuh / users
0755
collections
--
21 Sep 2026 1.19 PM
docteuh / users
0755
endpoints
--
13 Sep 2026 7.45 AM
docteuh / users
0755
form
--
13 Sep 2026 8.19 PM
docteuh / users
0755
generator
--
22 Sep 2026 12.36 AM
docteuh / users
0755
guzzle
--
13 Sep 2026 8.48 PM
docteuh / users
0755
i18ns
--
20 Sep 2026 8.33 PM
docteuh / users
0755
inter
--
21 Sep 2026 5.18 AM
docteuh / users
0755
markdown
--
23 Sep 2026 12.01 AM
docteuh / users
0755
psr
--
22 Sep 2026 12.56 PM
docteuh / users
0755
token
--
22 Sep 2026 9.56 AM
docteuh / users
0755
tool
--
13 Sep 2026 8.20 PM
docteuh / users
0755
user-interface
--
11 Sep 2026 7.54 AM
docteuh / users
0755
Authentication.php
40.264 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
Connected_Proxy_URL.php
1.231 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
Credentials.php
3.795 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
Disconnected_Reason.php
0.902 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
Google_Proxy.php
18.391 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
Has_Connected_Admins.php
3.245 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
Has_Multiple_Admins.php
1.548 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
Initial_Version.php
0.618 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
Owner_ID.php
1.522 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
Profile.php
1.63 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
Setup.php
12.325 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
Token.php
3.781 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
Verification.php
1.523 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
Verification_File.php
0.611 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
Verification_Meta.php
0.609 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
disallowed_STD3_mapped.php
4.757 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
disallowed_STD3_valid.php
0.912 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
icon-redirect-manager-20260827192224.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
paypal_16.png
0.619 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
wizard.scss
4.756 KB
18 Jun 2026 6.25 PM
docteuh / users
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF