Skip to content
Snippets Groups Projects
Commit 8086295c authored by Moritz Strohm's avatar Moritz Strohm
Browse files

fix for BIESt #977

Merge request studip/studip!562
parent ccf5e6d8
No related branches found
No related tags found
No related merge requests found
......@@ -1005,6 +1005,17 @@ class UserManagement
}
if ($delete_personal_documents && $delete_personal_content && $delete_names && $delete_memberships) {
// Delete the user from resource property entries of type "user":
ResourceProperty::deleteBySQL(
"`property_id` IN (
SELECT `property_id`
FROM `resource_property_definitions`
WHERE `type` = 'user'
)
AND `state` = :user_id",
['user_id' => $this->user_data['auth_user_md5.user_id']]
);
// delete Stud.IP account
$query = "DELETE FROM user_info WHERE user_id = ?";
$statement = DBManager::get()->prepare($query);
......
......@@ -51,7 +51,7 @@ class ResourceProperty extends SimpleORMap
parent::configure($config);
}
/**
* Determines whether this resource property is requestable
* by checking the requestable flag of the corresponding
......@@ -99,7 +99,11 @@ class ResourceProperty extends SimpleORMap
$string .= $this->state;
} elseif ($this->type == 'user') {
$user = User::find($this->state);
$string .= $user->getFullName();
if ($user) {
$string .= $user->getFullName();
} else {
$string .= _('unbekannt');
}
} else {
$string .= $this->state;
}
......
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