[DS-242] Special groups shown for logged in user rather than for user being examined - fix NPE

git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4077 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Stuart Lewis
2009-07-08 04:34:11 +00:00
parent 6312751e0a
commit 24ff8397c0

View File

@@ -475,7 +475,7 @@ public class Group extends DSpaceObject
// However, we only do this is we are looking up the special groups // However, we only do this is we are looking up the special groups
// of the current user, as we cannot look up the special groups // of the current user, as we cannot look up the special groups
// of a user who is not logged in. // of a user who is not logged in.
if (c.getCurrentUser().getID() == e.getID()) if ((c.getCurrentUser() != null) && (c.getCurrentUser().getID() == e.getID()))
{ {
Group[] specialGroups = c.getSpecialGroups(); Group[] specialGroups = c.getSpecialGroups();
for(Group special : specialGroups) for(Group special : specialGroups)