import java.util.List;
import java.util.Objects;
import javax.enterprise.context.RequestScoped;
+import javax.enterprise.event.Event;
+import javax.enterprise.inject.Any;
import javax.faces.view.facelets.FaceletException;
import javax.inject.Inject;
import javax.inject.Named;
import org.mxchange.jjobs.beans.BaseJobsController;
import org.mxchange.jjobs.beans.helper.JobsWebRequestController;
import org.mxchange.jjobs.beans.user.JobsUserWebSessionController;
+import org.mxchange.jusercore.events.confirmation.ConfirmedUserAccountEvent;
+import org.mxchange.jusercore.events.confirmation.UserConfirmedAccountEvent;
import org.mxchange.jusercore.exceptions.UserStatusConfirmedException;
import org.mxchange.jusercore.exceptions.UserStatusLockedException;
import org.mxchange.jusercore.model.user.User;
*/
private final UserSessionBeanRemote userBean;
+ /**
+ * Event being fired when a user has confirmed the account
+ */
+ @Inject
+ @Any
+ private Event<UserConfirmedAccountEvent> userConfirmedEvent;
+
/**
* User controller
*/
throw new FaceletException(MessageFormat.format("Cannot confirm user account {0}", user.getUserName()), ex); //NOI18N
}
+ // Fire event that the user has confirmed account
+ this.userConfirmedEvent.fire(new ConfirmedUserAccountEvent(updatedUser));
+
// Set it again in helper
this.beanHelper.setUser(updatedUser);
}