Kaynağa Gözat

Fixed issue where exception from user info was stopping showing results in admin search.

tags/3.0.0
Teknikode 3 yıl önce
ebeveyn
işleme
55bf97fe53

+ 14
- 7
Teknik/Areas/Admin/Controllers/AdminController.cs Dosyayı Görüntüle

@@ -64,15 +64,22 @@ namespace Teknik.Areas.Admin.Controllers
{
foreach (Users.Models.User user in results)
{
SearchResultViewModel model = new SearchResultViewModel();
model.Username = user.Username;
if (Config.EmailConfig.Enabled)
try
{
model.Email = string.Format("{0}@{1}", user.Username, Config.EmailConfig.Domain);
SearchResultViewModel model = new SearchResultViewModel();
model.Username = user.Username;
if (Config.EmailConfig.Enabled)
{
model.Email = string.Format("{0}@{1}", user.Username, Config.EmailConfig.Domain);
}
model.JoinDate = user.JoinDate;
model.LastSeen = UserHelper.GetLastAccountActivity(db, Config, user);
models.Add(model);
}
catch (Exception ex)
{
// Skip this result
}
model.JoinDate = user.JoinDate;
model.LastSeen = UserHelper.GetLastAccountActivity(db, Config, user);
models.Add(model);
}
}


Loading…
İptal
Kaydet