public string SendActiveMail() { var u = this.GetLoginUser(); if (u.Role == UserRole.NonactivatedUser) { var uv = UserValidate.FindOne(p => p.UserId == u.Id); if (uv == null) { uv = new UserValidate().Init(u.Id); uv.Save(); } uv.Mode = 'a'; SendMail(u, uv); Flash.Notice = "激活邮件发送成功"; } return(UrlTo <UserController>(p => p.Profile())); }