Commit b5328db2 authored by Ruslan Kabalin's avatar Ruslan Kabalin Committed by Gerrit Code Review
Browse files

Merge "Remove profile icon from session on delete (see bug #805742)"

parents 04a8ac27 e8d02087
......@@ -1734,6 +1734,24 @@ class ArtefactTypeImage extends ArtefactTypeFile {
class ArtefactTypeProfileIcon extends ArtefactTypeImage {
public function delete() {
global $USER;
parent::delete();
if ($USER->get('profileicon') == $this->id) {
$USER->profileicon = null;
$USER->commit();
}
}
public static function bulk_delete($artefactids) {
global $USER;
parent::bulk_delete($artefactids);
if (in_array($USER->get('profileicon'), $artefactids)) {
$USER->profileicon = null;
$USER->commit();
}
}
public static function get_links($id) {
$wwwroot = get_config('wwwroot');
......
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