diff --git a/htdocs/artefact/internal/lib.php b/htdocs/artefact/internal/lib.php index ac579e87f0c8659de2fb34263579cc2c3d7d6e32..a4930a95b857efbd1b21b0a4f231af9525b02d8e 100644 --- a/htdocs/artefact/internal/lib.php +++ b/htdocs/artefact/internal/lib.php @@ -545,16 +545,16 @@ class ArtefactTypeProfileField extends ArtefactTypeProfile { } class ArtefactTypeCachedProfileField extends ArtefactTypeProfileField { - + public function commit() { global $USER; parent::commit(); + $field = $this->get_artefact_type(); if (!$this->deleted) { - $field = $this->get_artefact_type(); set_field('usr', $field, $this->title, 'id', $this->owner); - if ($this->owner == $USER->get('id')) { - $USER->{$field} = $this->title; - } + } + if ($this->owner == $USER->get('id')) { + $USER->{$field} = $this->title; } }