public function getAccount(ProjectAccess $user, $reset = false)
    {
        if (isset(self::$accountsCache[$user->id]) && !$reset) {
            return self::$accountsCache[$user->id];
        }

        $cacheKey = 'account:' . $user->id;
        if ($reset || !($details = $this->cache->fetch($cacheKey))) {
            $details = $user->getAccount()->getProperties();
            $this->cache->save($cacheKey, $details, $this->config->get('api.users_ttl'));
            self::$accountsCache[$user->id] = $details;
        }

        return $details;
    }
public function getAccount(ProjectAccess $user, $reset = false)
    {
        if (isset(self::$accountsCache[$user->id]) && !$reset) {
            return self::$accountsCache[$user->id];
        }

        $cacheKey = 'account:' . $user->id;
        if ($reset || !($details = $this->cache->fetch($cacheKey))) {
            $details = $user->getAccount()->getProperties();
            $this->cache->save($cacheKey, $details, $this->config->get('api.users_ttl'));
            self::$accountsCache[$user->id] = $details;
        }

        return $details;
    }
public function getAccount ( ProjectAccess $ user , $ reset = false ) { if ( isset ( self :: $ accountsCache [ $ user -> id ] ) && ! $ reset ) { return self :: $ accountsCache [ $ user -> id ] ; } $ cacheKey = 'account:' . $ user -> id ; if ( $ reset || ! ( $ details = $ this -> cache -> fetch ( $ cacheKey ) ) ) { $ details = $ user -> getAccount ( ) -> getProperties ( ) ; $ this -> cache -> save ( $ cacheKey , $ details , $ this -> config -> get ( 'api.users_ttl' ) ) ; self :: $ accountsCache [ $ user -> id ] = $ details ; } return $ details ; }
Get a user's account info.

@param ProjectAccess $user
@param bool $reset

@return array
An array containing 'email' and 'display_name'.
Get a user s account info .