Exemple #1
0
 void NoEmailNotice(User sender, CreateUserEventArgs eventArgs)
 {
     if (string.IsNullOrEmpty(sender.AccountEmail))
     {
         NoticeService noticeService = new NoticeService();
         Notice notice = Notice.New();
         notice.TemplateName = "NoEmailNotice";
         notice.TypeId = NoticeTypeIds.Instance().Hint();
         notice.LeadingActorUrl = SiteUrls.Instance().EditUserProfile(sender.UserName);
         notice.UserId = sender.UserId;
         notice.Status = NoticeStatus.Unhandled;
         noticeService.Create(notice);
     }
 }
        /// <summary>
        /// 初始化用户的应用
        /// </summary>
        /// <param name="sender">用户实体</param>
        /// <param name="eventArgs">事件参数</param>
        private void InitAppForUserEventMoudle_After(User sender, CreateUserEventArgs eventArgs)
        {
            if (sender == null)
                return;

            applicationService.InstallApplicationsOfPresentAreaOwner(PresentAreaKeysOfBuiltIn.UserSpace, sender.UserId);

            var presentArea = new PresentAreaService().Get(PresentAreaKeysOfBuiltIn.UserSpace);
            new ThemeService().ChangeThemeAppearanceUserCount(PresentAreaKeysOfBuiltIn.UserSpace, null, presentArea.DefaultThemeKey + "," + presentArea.DefaultAppearanceKey);
        }
Exemple #3
0
 /// <summary>
 /// 创建用户的时候修改积分
 /// </summary>
 /// <param name="sender">创建用户角色</param>
 /// <param name="eventArgs">参数</param>
 void RegisterEventModule_After(User sender, CreateUserEventArgs eventArgs)
 {
     PointService pointService = new PointService();
     string description = string.Format(ResourceAccessor.GetString("PointRecord_Pattern_Register"), sender.UserName);
     pointService.GenerateByRole(sender.UserId, PointItemKeys.Instance().Register(), description, true);
 }
Exemple #4
0
 void UserEmailEventMoudle_After(User sender, CreateUserEventArgs eventArgs)
 {
     EmailService emailService = new EmailService();
     //发送注册成功邮件
     emailService.SendAsyn(EmailBuilder.Instance().RegisterSuccess(eventArgs.Password, sender));
 }