Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
5baeab76
Commit
5baeab76
authored
Jun 24, 2014
by
webchick
Browse files
Issue
#2290157
by marcingy: Convert comment_user_predelete query to entity query.
parent
fdfd3c7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/modules/comment/comment.module
View file @
5baeab76
...
...
@@ -991,7 +991,9 @@ function comment_user_cancel($edit, $account, $method) {
* Implements hook_user_predelete().
*/
function
comment_user_predelete
(
$account
)
{
$cids
=
db_query
(
'SELECT c.cid FROM {comment} c WHERE uid = :uid'
,
array
(
':uid'
=>
$account
->
id
()))
->
fetchCol
();
$entity_query
=
\
Drupal
::
entityQuery
(
'comment'
);
$entity_query
->
condition
(
'uid'
,
$account
->
id
());
$cids
=
$entity_query
->
execute
();
entity_delete_multiple
(
'comment'
,
$cids
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment