changed set_invitesleft: no need to count number of rows, only if(lib/model.phpresult)