InvitationModel::getByUserID PHP Method

getByUserID() public method

public getByUserID ( $UserID, string $InvitationID = '', integer $Limit = 50, integer $Offset ) : Gdn_DataSet
$UserID
$InvitationID string
$Limit integer
$Offset integer
return Gdn_DataSet
    public function getByUserID($UserID, $InvitationID = '', $Limit = 50, $Offset = 0)
    {
        $this->SQL->select('i.*')->select('u.Name', '', 'AcceptedName')->from('Invitation i')->join('User u', 'i.AcceptedUserID = u.UserID', 'left')->where('i.InsertUserID', $UserID)->orderBy('i.DateInserted', 'desc')->limit($Limit, $Offset);
        if (is_numeric($InvitationID)) {
            $this->SQL->where('Invitation.InvitationID', $InvitationID);
        }
        return $this->SQL->get();
    }