1 Reply Latest reply on Mar 20, 2013 11:44 AM by it2000

    Manually Implementing the Ban user function in Jive

      Hi,

       

      We have login customized login functionality in Jive. Now we are trying to implement Ban user function in Jive.

       

      We are planning to design a filter and check that if the user is banned, we will redirect to a new page.

       

      I have followed the code at Jive Documentation.

       

      I added this piece of code in the filter.

       

                        User jiveRepresentation = userManager.getUser(externalUser);

                          long uid= jiveRepresentation.getID();

       

                          BanFilter banFilter= new BanFilter();

                          banFilter.setUserID(uid);

       

       

                          int  banCount= banManager.getBansCount(banFilter);

       

                          if(banCount!=0)

                          {

                              //redirecting to some page

                              servletResponse.sendRedirect("/Error.jsp");

                          }

       

      But I am getting some error. The initialization of userAgent object is not happening.

       

      Could some one suggest solution for this.

       

      If there is a better approach other than this, let me know.

       

      Thanks,

      Muzimil.