return updateSubjectAndPreferences(subjectToModify, null, true, false);
}
public Subject updateSubject(Subject subjectToModify, String newPassword) throws RuntimeException {
try {
Subject sessionSubject = getSessionSubject();
Subject modifiedSubject;
synchronized (subjectLock) {
modifiedSubject = subjectManager.updateSubject(sessionSubject, subjectToModify, newPassword);
}
Subject subject = SerialUtility.prepare(modifiedSubject, "SubjectManager.updateSubjectPW");
// Clear the prefs for this subject from the user prefs cache that portal-war uses, in case we just
// changed any prefs; otherwise the cache would contain stale prefs.
LookupUtil.getSubjectPreferencesCache().clearConfiguration(subject.getId());
return subject;
} catch (Throwable t) {
throw getExceptionToThrowToClient(t);
}
}