HEX
Server:Apache
System:Linux localhost 5.10.0-14-amd64 #1 SMP Debian 5.10.113-1 (2022-04-29) x86_64
User:enlugo-es (10006)
PHP:7.4.33
Disabled:opcache_get_status
Upload Files
File: /var/www/vhosts/enlugo.es/httpdocs/wp-content/plugins/google-maps-ready/modules/user/mod.php
<?php
class userGmp extends moduleGmp {
    public function loadUserData() {
        return $this->getCurrent();
    }
    public function addProfileFieldsHtml($user) {
        //if($this->isCustomer($user->ID)) {
            $this->getController()->getView('user')->displayAllMeta($user->ID);
        //}
    }

    public function isAdmin() {
		if(!function_exists('wp_get_current_user')) {
			frameGmp::_()->loadPlugins();
		}
        return current_user_can('manage_options');
    }

	public function getCurrentUserPosition() {
		if($this->isAdmin())
			return GMP_ADMIN;
		else if($this->getCurrentID())
			return GMP_LOGGED;
		else 
			return GMP_GUEST;
	}
    public function getCurrent() {
        return $this->getController()->getModel('user')->get();
    }

    public function getCurrentID() {
        return $this->getController()->getModel()->getCurrentID();
    }
    /**
     * Returns the available tabs
     * 
     * @return array of tab 
     */
    public function getTabs(){
        $tabs = array();
        $tab = new tabGmp(langGmp::_('User Fields'), $this->getCode());
        $tab->setView('userFieldsTab');
		$tab->setSortOrder(3);
		$tab->setParent('templatesGmp');
		$tab->setNestingLevel(1);
        $tabs[] = $tab;
        return $tabs;
    }
}