public static function getSessionWithUserId($userid)
	{
		// get list of all sessions
		$sessions = \App::get('session')->getStore()->all(array(
			'guest'    => 0,
			'distinct' => 1
		));

		// see if any session matches our userid
		foreach ($sessions as $session)
		{
			if ($session->userid == $userid)
			{
				return $session;
			}
		}

		// nothing found
		return null;
	}
public static function getSessionWithUserId($userid)
	{
		// get list of all sessions
		$sessions = \App::get('session')->getStore()->all(array(
			'guest'    => 0,
			'distinct' => 1
		));

		// see if any session matches our userid
		foreach ($sessions as $session)
		{
			if ($session->userid == $userid)
			{
				return $session;
			}
		}

		// nothing found
		return null;
	}
public static function getSessionWithUserId ( $ userid ) { // get list of all sessions $ sessions = \ App :: get ( 'session' ) -> getStore ( ) -> all ( array ( 'guest' => 0 , 'distinct' => 1 ) ) ; // see if any session matches our userid foreach ( $ sessions as $ session ) { if ( $ session -> userid == $ userid ) { return $ session ; } } // nothing found return null ; }
Get Session by User Id

@param   integer  $id  User ID
@return  mixed
Get Session by User Id