1
0
mirror of https://git.teknik.io/Teknikode/Teknik.git synced 2023-08-02 14:16:22 +02:00

Added enabled config around 'delete' for email.

This commit is contained in:
Uncled1023 2016-02-04 12:46:43 -08:00
parent 17a66c79c2
commit b6809d4390

View File

@ -338,6 +338,8 @@ namespace Teknik.Areas.Profile.Controllers
public ActionResult Delete()
{
if (ModelState.IsValid)
{
if (Config.EmailConfig.Enabled)
{
// Delete Email
var app = new hMailServer.Application();
@ -346,6 +348,7 @@ namespace Teknik.Areas.Profile.Controllers
var domain = app.Domains.ItemByName[Config.EmailConfig.Domain];
var account = domain.Accounts.ItemByAddress[string.Format("{0}@{1}", User.Identity.Name, Config.EmailConfig.Domain)];
account.Delete();
}
// Delete Git
if (Config.GitConfig.Enabled)