Something got wrong with the copy-paste, trying again:
public static IDataReader SiteUser_GetOnlineSince(int siteID, DateTime sinceTime)
{
StringBuilder sqlCommand = new StringBuilder();
sqlCommand.Append("SELECT * FROM mp_Users WHERE SiteID = ?SiteID ");
sqlCommand.Append("AND LastActivityDate > ?SinceTime ; ");
MySqlParameter[] arParams = new MySqlParameter[2];
arParams[0] = new MySqlParameter("?SiteID", MySqlDbType.Int32);
arParams[0].Direction = ParameterDirection.Input;
arParams[0].Value = SiteID;
arParams[1] = new MySqlParameter("?SinceTime", MySqlDbType.Datetime);
arParams[1].Direction = ParameterDirection.Input;
arParams[1].Value = sinceTime;
return MySqlHelper.ExecuteReader(
GetConnectionString(),
sqlCommand.ToString(),
arParams);
}
{
Collection<SiteUser> users = new Collection<SiteUser>();
IDataReader reader = dbPortal.SiteUser_GetOnlineSince(siteID, sinceTime);
SiteSettings settings = SiteUtils.GetCurrentSiteSettings();
while (reader.Read())
{
users.Add(new SiteUser(settings, Convert.ToInt32(reader["UserID"])));
}
return users;
}
public static Collection<SiteUser> GetUsersOnlineSince(int siteID, DateTime sinceTime)