Exemplo n.º 1
0
    /**
     * Gets all users on identica that have the same username as the given 
     * twitter user's followees
     * 
     * @param  strings      $username
     * @param  null|integer $count
     * @return FriendCollection
     */
    public function twitterIntersect($username, &$count = null)
    {
        $twitterService = new Twitter();
        $friends = $twitterService->getFriendsByUsername($username);

        if ($count !== null) {
            $count = count($friends);
        }
        
        foreach ($friends as $key => $friend) {
            if (!$this->usernameExists($friend->username)) {
                unset($friends[$key]);
            }
        }
        
        return $friends;
    }
Exemplo n.º 2
0
 /**
  * Kills the user's auth with twitter
  */
 public function logoutAction()
 {
     $twitterService = new TwitterService();
     $twitterService->clearAuthentication();
     
     $this->_helper->redirector->gotoUrlAndExit('/');
 }