Commit 6ecbe067 authored by Aaron Wells's avatar Aaron Wells Committed by Son Nguyen

Update session-cached display name when deleting it

Bug 1223063: ArtefactTypeCachedProfileField was only updating
the session cache when you updated a value, not when you deleted it.
Of course, the only one that can get deleted and that is shown
anywhere is the PreferredName (aka display name) so only this
one shows the problem.

Change-Id: I55f9c96b59c91ced5cba3cf6443ba2e222201ef7
Signed-off-by: Aaron Wells's avatarAaron Wells <>
parent 5f4f047d
......@@ -549,14 +549,14 @@ class ArtefactTypeCachedProfileField extends ArtefactTypeProfileField {
public function commit() {
global $USER;
if (!$this->deleted) {
$field = $this->get_artefact_type();
if (!$this->deleted) {
set_field('usr', $field, $this->title, 'id', $this->owner);
if ($this->owner == $USER->get('id')) {
$USER->{$field} = $this->title;
public function delete() {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment