public function getActiveSessions()
    {
        // Parse the user-agents to get a user-friendly Browser, version and platform.
        $parser = UAParser\Parser::create();
        $this->getRepositoryAuthtoken()->deleteExpiredTokens();
        $sessions = $this->getRepositoryAuthtoken()->getActiveSessions() ?: [];

        foreach ($sessions as &$session) {
            $ua = $parser->parse($session->getUseragent());
            $session->setBrowser(sprintf('%s / %s', $ua->ua->toString(), $ua->os->toString()));
        }

        return $sessions;
    }
public function getActiveSessions()
    {
        // Parse the user-agents to get a user-friendly Browser, version and platform.
        $parser = UAParser\Parser::create();
        $this->getRepositoryAuthtoken()->deleteExpiredTokens();
        $sessions = $this->getRepositoryAuthtoken()->getActiveSessions() ?: [];

        foreach ($sessions as &$session) {
            $ua = $parser->parse($session->getUseragent());
            $session->setBrowser(sprintf('%s / %s', $ua->ua->toString(), $ua->os->toString()));
        }

        return $sessions;
    }
public function getActiveSessions ( ) { // Parse the user-agents to get a user-friendly Browser, version and platform. $ parser = UAParser \ Parser :: create ( ) ; $ this -> getRepositoryAuthtoken ( ) -> deleteExpiredTokens ( ) ; $ sessions = $ this -> getRepositoryAuthtoken ( ) -> getActiveSessions ( ) ? : [ ] ; foreach ( $ sessions as & $ session ) { $ ua = $ parser -> parse ( $ session -> getUseragent ( ) ) ; $ session -> setBrowser ( sprintf ( '%s / %s' , $ ua -> ua -> toString ( ) , $ ua -> os -> toString ( ) ) ) ; } return $ sessions ; }
Lookup active sessions.

@return array
Lookup active sessions .