diff options
author | Marc Alexander <admin@m-a-styles.de> | 2016-03-10 12:18:47 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2016-03-10 12:18:47 +0100 |
commit | 9bcf8df5d0bf1ca813f4fb860ea3128aa905104a (patch) | |
tree | 7c47147c9dbbe34c646cbfe78252dd2228360d8d /phpBB | |
parent | 61e0247f220c9e523e566d517dfa8dc22cc95513 (diff) | |
parent | 40bd4c8b721bccec4f889a035934fc8db3b66c92 (diff) | |
download | forums-9bcf8df5d0bf1ca813f4fb860ea3128aa905104a.tar forums-9bcf8df5d0bf1ca813f4fb860ea3128aa905104a.tar.gz forums-9bcf8df5d0bf1ca813f4fb860ea3128aa905104a.tar.bz2 forums-9bcf8df5d0bf1ca813f4fb860ea3128aa905104a.tar.xz forums-9bcf8df5d0bf1ca813f4fb860ea3128aa905104a.zip |
Merge pull request #4184 from lavigor/ticket/14486
[ticket/14486] Add an event and fix an event in login_box()
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/functions.php | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index ad361107af..72c0d458c6 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2821,6 +2821,21 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa $user->setup(); } + /** + * This event allows an extension to modify the login process + * + * @event core.login_box_before + * @var string redirect Redirect string + * @var string l_explain Explain language string + * @var string l_success Success language string + * @var bool admin Is admin? + * @var bool s_display Display full login form? + * @var string err Error string + * @since 3.1.9-RC1 + */ + $vars = array('redirect', 'l_explain', 'l_success', 'admin', 's_display', 'err'); + extract($phpbb_dispatcher->trigger_event('core.login_box_before', compact($vars))); + // Print out error if user tries to authenticate as an administrator without having the privileges... if ($admin && !$auth->acl_get('a_')) { @@ -2833,7 +2848,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa trigger_error('NO_AUTH_ADMIN'); } - if ($request->is_set_post('login') || ($request->is_set('login') && $request->variable('login', '') == 'external')) + if (empty($err) && ($request->is_set_post('login') || ($request->is_set('login') && $request->variable('login', '') == 'external'))) { // Get credential if ($admin) @@ -2902,11 +2917,11 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa * * @event core.login_box_redirect * @var string redirect Redirect string - * @var boolean admin Is admin? - * @var bool return If true, do not redirect but return the sanitized URL. + * @var bool admin Is admin? * @since 3.1.0-RC5 + * @changed 3.1.9-RC1 Removed undefined return variable */ - $vars = array('redirect', 'admin', 'return'); + $vars = array('redirect', 'admin'); extract($phpbb_dispatcher->trigger_event('core.login_box_redirect', compact($vars))); // append/replace SID (may change during the session for AOL users) |