mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
Merge pull request #4852 from javiexin/ticket/15248
[ticket/15248] Make use of event parameters of core.modify_posting_auth
This commit is contained in:
commit
8938a0ce98
1 changed files with 3 additions and 8 deletions
|
@ -340,11 +340,6 @@ switch ($mode)
|
|||
$is_authed = true;
|
||||
$mode = 'soft_delete';
|
||||
}
|
||||
else if (!$is_authed)
|
||||
{
|
||||
// Display the same error message for softdelete we use for delete
|
||||
$mode = 'delete';
|
||||
}
|
||||
break;
|
||||
}
|
||||
/**
|
||||
|
@ -393,13 +388,13 @@ $vars = array(
|
|||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.modify_posting_auth', compact($vars)));
|
||||
|
||||
if (!$is_authed)
|
||||
if (!$is_authed || !empty($error))
|
||||
{
|
||||
$check_auth = ($mode == 'quote') ? 'reply' : $mode;
|
||||
$check_auth = ($mode == 'quote') ? 'reply' : (($mode == 'soft_delete') ? 'delete' : $mode);
|
||||
|
||||
if ($user->data['is_registered'])
|
||||
{
|
||||
trigger_error('USER_CANNOT_' . strtoupper($check_auth));
|
||||
trigger_error(empty($error) ? 'USER_CANNOT_' . strtoupper($check_auth) : implode('<br/>', $error));
|
||||
}
|
||||
$message = $user->lang['LOGIN_EXPLAIN_' . strtoupper($mode)];
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue