Affects Version/s: 7.2.X, Master
Steps to reproduce:
1. Create a User 'Test User'
2. Create a User Group 'Test Group'
3. Add User 'Test User' to User Group 'Test Group'
4. Create a Site 'Test Site'
5. Add the User Group 'Test Group' as Site members
6. Add a page 'Home' to the site.
7. Add the messageboards portlet to the 'Home' page.
8. Configure 'Control Panel' > 'Instance Settings' > 'Community Tools' > 'Mentions' :
9. Have Allow Users to Mention Other Users ticked
10. Click the Define Mentions Capability for Users at the Radio button section
11. Have Site Members Can Mention Each Other checked from the newly appeared options
12. On the Test Site go to Configuration -> Settings -> Social and have the Allow Users to Mention Other Users slider on Yes
13. Log in with created Test User and go to the Home page of the Test Site.
14. Create a new Thread, and try to mention someone (@Test for example)
You'll get a java.lang.ArrayIndexOutOfBoundsException: 0.
DefaultMentionsUserFinder.java, by trying to get the sites (groups) the User is a member of, and for that, the following is called: user.getGroupIds() BUT this only returns the sites the user is a direct member of, not the sites of which he is a member through a User Group