aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_user.inc.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/functions_user.inc.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index d7aa81f24..02c1e7e13 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -1202,13 +1202,14 @@ function is_adviser()
* @param action edit/delete
* @return bool
*/
-function can_manage_comment($action, $comment_author)
+function can_manage_comment($action, $comment_author_id)
{
if (!in_array($action, array('delete','edit'))) {
return false;
}
return (is_admin() ||
- (($GLOBALS['user']['username'] == $comment_author)
+ (($GLOBALS['user']['id'] == $comment_author_id)
+ && !is_a_guest()
&& $GLOBALS['conf'][sprintf('user_can_%s_comment', $action)]));
}