Skip to content
Snippets Groups Projects
Commit b5ee51ed authored by Larbi Gharib's avatar Larbi Gharib
Browse files

Update user profile

Change-Id: I04ad048b1086ef38375ce0688060baf79757e7d5
parent c7f16e1b
No related branches found
No related tags found
No related merge requests found
......@@ -112,10 +112,10 @@ public class DirectoryEntryServlet extends HttpServlet {
if (callingUser.getAccessLevel() == AccessLevel.ADMIN || (callingUser.getAccessLevel() == AccessLevel.USER && callingUser.getUsername().equals(targetUser.getUsername()))) {
select = new StatementList();
select.addStatement(new StatementElement("username", "=", userProfile.getUsername(), ""));
if (dataStore.updateUserGroupMappings(userProfile))
if (dataStore.updateUserProfile(userProfile) && dataStore.updateUserGroupMappings(userProfile))
resp.setStatus(200);
else
resp.sendError(404, "Could not update the users's profile information");
resp.sendError(500, "Could not update the users's profile information");
} else {
resp.sendError(403, "The user is either not an admin account or is attempting to edit a profile that is not his own!");
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment