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();
int banCount= banManager.getBansCount(banFilter);
//redirecting to some page
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.
The v3 REST API /people/username/<username> or <email> returns a 'person' with an Jive.enabled property. This may also work within Java - disabling users may be more portable than using the ban property.
Actually the login should already fail if a user is disabled.