protected function resolveIdentity($username, $accountId)
    {
        $identitySeed = $this->getServiceBroker()
            ->service('User')
            ->resolveIdentity($username);
        
        $accountIds = isset($identitySeed['accountIds']) ? $identitySeed['accountIds'] : [];
    
        if (in_array($accountId, $accountIds)) {
            $identitySeed['account']    = $accountId;
            $identitySeed['accountId']  = $accountId;
        }
        
        if ($identitySeed) {
            return $this->prepareIdentity($identitySeed);
        } else {
            return false;
        }
    }
protected function resolveIdentity($username, $accountId)
    {
        $identitySeed = $this->getServiceBroker()
            ->service('User')
            ->resolveIdentity($username);
        
        $accountIds = isset($identitySeed['accountIds']) ? $identitySeed['accountIds'] : [];
    
        if (in_array($accountId, $accountIds)) {
            $identitySeed['account']    = $accountId;
            $identitySeed['accountId']  = $accountId;
        }
        
        if ($identitySeed) {
            return $this->prepareIdentity($identitySeed);
        } else {
            return false;
        }
    }
protected function resolveIdentity ( $ username , $ accountId ) { $ identitySeed = $ this -> getServiceBroker ( ) -> service ( 'User' ) -> resolveIdentity ( $ username ) ; $ accountIds = isset ( $ identitySeed [ 'accountIds' ] ) ? $ identitySeed [ 'accountIds' ] : [ ] ; if ( in_array ( $ accountId , $ accountIds ) ) { $ identitySeed [ 'account' ] = $ accountId ; $ identitySeed [ 'accountId' ] = $ accountId ; } if ( $ identitySeed ) { return $ this -> prepareIdentity ( $ identitySeed ) ; } else { return false ; } }
Resolve identity based on username

@param string $username
@param string $accountId
@return boolean
Resolve identity based on username