Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...IUserEventHandlers not firingIUserEventHandlers not firing
Previous
 
Next
New Post
5/3/2018 3:30 PM
 

I'm trying to make use of IUserEventHandlers to add some custom functionality when a user logs in. I have been using the following post as a guide to try and get this working:

http://www.dnnsoftware.com/answers/how-can-i-handle-the-profile-updated-event

My code is as follows:



using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using DotNetNuke.Framework;

using DotNetNuke.Entities.Users;

using System.Composition;


namespace BusinessLayer.Handlers

{

    [Export(typeof(IUserEventHandlers))]

    public class UserEventHandlers : IUserEventHandlers

    {

        TermsController _tc = new TermsController();

        public void UserApproved(object sender, UserEventArgs args)

        {           

        }

        public void UserAuthenticated(object sender, UserEventArgs args)

        {            

        }

        public void UserCreated(object sender, UserEventArgs args)

        {

            UserInfo userInfo = args.User;

            _tc.SignTerms(userInfo.UserID, 0);

        }


        public void UserDeleted(object sender, UserEventArgs args)

        {            

        }


        public void UserRemoved(object sender, UserEventArgs args)

        {            

        }

    }

}



The problem I am having is that the methods never seem to be firing. I have also tried using the IProfileEventHandlers again the same problem. The methods are never hit. 

I've seen that some others have been having similar issues with this in recent months and so just wondered if this is an issue or if I am doing something wrong. 

I am using DNN version 07.04.01 (280)

Thanks

Scott

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...IUserEventHandlers not firingIUserEventHandlers not firing


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out