Return the current active profile.
@return array
320280
public function getActiveProfile() {
      $response = $this->client->request('get', 'getActiveProfile');
      return [
         'statusCode' => $response->getStatusCode(),
         'body' => $response->getBody()->getContents(),
      ];
   }
354288
public function getData()
    {
        return [
            'user___user__view_profile' => 'View user profile',
            'user___user__view_own_profile' => [
                'type' => Item::TYPE_PERMISSION,
                'description' => 'View user own profile',
                'rule' => new UpdateOwnDataRule(),
                'children' => ['user___user__view_profile']
            ],
            'user' => [
                'type' => Item::TYPE_ROLE,
                'description' => 'User',
                'children' => ['user___user__view_own_profile'],
            ],
            'admin' => [
                'type' => Item::TYPE_ROLE,
                'description' => 'Admin',
                'children' => ['user___user__view_profile']
            ],
            'owner' => [
                'type' => Item::TYPE_ROLE,
                'description' => 'Application owner',
                'children' => ['admin'],
            ]
        ];
    }
1188760
public function getCurrentAccount()
    {
        $this->currentAccount || $this->currentAccount = wei()->wechatAccount()->cache()->curApp()->findOrInit(false);

        return $this->currentAccount;
    }
826434
public function getActiveCompany(){
        //user model required
        if(!Yii::app()->hasModule('user')){
            return false;
        }        
        if($this->_activeCompany){
            return $this->_activeCompany;
        }
        
        if(Yii::app()->user->isGuest){
            return false;
        }

        if(!Yii::app()->getModule('user')->user()){
            return false;
        }
        $cmmp_id = Yii::app()->getModule('user')->user()->profile->{$this->profiles_ccmp_field};

        if(!$cmmp_id){
            return FALSE;
        }
        $this->_activeCompany = $cmmp_id;
        return $this->_activeCompany;
    }
123068
public function getCurrentProfilePosts()
    {
        $profile = $this->getCurrentProfile();

        if ($profile) {
            return $profile->BlogPosts()->filter('ParentID', $this->ID);
        }

        return null;
    }
1340498
public function current()
    {
        if (!is_array($this->val)) {
            return null;
        }
        if ($this->assocArray) {
            $keys = array_keys($this->val);
            return $this->val[$keys[$this->position]];
        }

        return $this->val[$this->position];
    }
1137350
public function getCurrentUser()
    {
        if ($this->currentuser === null) {
            $this->currentuser = $this->app['session']->isStarted() ? $this->app['session']->get('authentication') : null;
            if ($this->currentuser instanceof AccessControl\Token\Token) {
                $this->currentuser = $this->currentuser->getUser()->toArray();
            }
        }

        return $this->currentuser;
    }
627472
public static function CurrentUser()
    {
        if (static::IsAuthenticatedRequest()) {
            $cryptor = new GnCryptor();
            $cookie = $cryptor->decrypt($_COOKIE['GpsNoseAuthentication']);
            $json = json_decode($cookie);
            $gnPrincipal = new GnPrincipal();
            $gnPrincipal->LoginName = $json->{"LoginName"};
            $gnPrincipal->LoginId = $json->{"LoginId"};
            $gnPrincipal->ProfileTags = $json->{"ProfileTags"};
            return $gnPrincipal;
        }
        return NULL;
    }
436721
public function getProfile() : ?string 
    {
        if ( ! $this->hasProfile()) {
            $this->setProfile($this->getDefaultProfile());
        }
        return $this->profile;
    }
428539
public function getActiveEntities() {
      $response = $this->client->request('get', 'getActiveEntities');
      return [
         'statusCode' => $response->getStatusCode(),
         'body' => $response->getBody()->getContents(),
      ];
   }
395800
public function current()
    {
        if($this->folderList == null){
            $this->folderList = $this->listFolder();
        }
        return $this->folderList[$this->key];
    }
1028538
public function getProfileAlias()
    {
        $link = $this->getProfile();
        if ($link && $link->href) {
            $guidOrAlias = explode('/', $link->href);
            $guidOrAlias = end($guidOrAlias);
            return isset(self::$_profileAliases[$guidOrAlias]) ? self::$_profileAliases[$guidOrAlias] : $guidOrAlias;
        } else {
            return null;
        }
    }
1065305
public static function getActive()
    {
        self::setActiveIDs();
        if(self::getActiveIDs()) {
            return MenuLink::findByID(current(self::getActiveIDs()));
        }
        return;
    }
873807
public function getActiveUsers()
    {
        $data = $this->call('apps/' . $this->appId . '/activeusers', [], 'get');

        $array = [];
        foreach ($data as $msg) {
            $array[] = User::fromResponse($msg);
        }

        return $array;
    }
265056
public static function getStatuses()
    {
        return [
            self::STATUS_ACTIVE => Yii::t('podium/view', 'Active'),
            self::STATUS_BANNED => Yii::t('podium/view', 'Banned'),
            self::STATUS_REGISTERED => Yii::t('podium/view', 'Registered'),
        ];
    }
701415
public function getProfiles()
    {
        if (!array_key_exists('profileIds', $this->content)) {
            return [];
        }

        $profiles = [];

        foreach ($this->content['profileIds'] as $profileId) {
            $profiles[] = $this->security->fetchProfile($profileId);
        }

        return $profiles;
    }
1095013
public function getActiveProfile()
    {
        $profiles = $this->getProfiles();
        $profileId = $this->getProfileId();

        if (!is_array($profiles)) {
            throw new \Exception('<fg=red>The config is invalid</fg=red>');
        }

        foreach ($profiles as $profile) {
            if ($profile['profileId'] == $profileId) {
                return $profile;
            }
        }
    }