Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ticket/14258] Add event into auth::login before session creation #4004

Merged
merged 3 commits into from Oct 24, 2015

Conversation

@paul999
Copy link
Member

paul999 commented Oct 24, 2015

Add a new event in the login method just before the session create so extensions can do some additional validation during login.

PHPBB3-14258

Add a new event in the login method just before the session create,
so extensions can do some additional validation during login.

PHPBB3-14258
@CHItA CHItA added this to the 3.1.7 milestone Oct 24, 2015
@CHItA CHItA added Event 🔌 and removed 3.1 (Ascraeus) labels Oct 24, 2015
@@ -982,6 +983,25 @@ function login($username, $password, $autologin = false, $viewonline = 1, $admin
redirect($url);
}
/**
* This event is triggered just after the user has been checked if he has a valid username/password,

This comment has been minimized.

Copy link
@marc1706

marc1706 Oct 24, 2015

Member

I'd prefer Event is triggered after checking for valid username and password, and before the actual session creation

* This event is triggered just after the user has been checked if he has a valid username/password,
* but before the actual session creation.
*
* @event core.auth_login_before_session_create

This comment has been minimized.

Copy link
@marc1706

marc1706 Oct 24, 2015

Member

core.auth_login_session_create_before

* but before the actual session creation.
*
* @event core.auth_login_before_session_create
* @var array login Variable containing login array value

This comment has been minimized.

Copy link
@marc1706

marc1706 Oct 24, 2015

Member

Variable containing login array

* @event core.auth_login_before_session_create
* @var array login Variable containing login array value
* @var bool admin Variable containing if is logging into the acp
* @var string username Variable containing the username

This comment has been minimized.

Copy link
@marc1706

marc1706 Oct 24, 2015

Member

Username of user to log in

* @var array login Variable containing login array value
* @var bool admin Variable containing if is logging into the acp
* @var string username Variable containing the username
* @var bool autologin Variable containing if this is by auto login

This comment has been minimized.

Copy link
@marc1706

marc1706 Oct 24, 2015

Member

Boolean variable signaling whether login is triggered via auto login

Update comments regarding variables.

PHPBB3-14258
@@ -982,6 +983,24 @@ function login($username, $password, $autologin = false, $viewonline = 1, $admin
redirect($url);
}
/**
* TEvent is triggered after checking for valid username and password, and before the actual session creation.

This comment has been minimized.

Copy link
@marc1706

marc1706 Oct 24, 2015

Member

TEvent? :)

Fix typo

PHPBB3-14258
marc1706 added a commit to marc1706/phpbb that referenced this pull request Oct 24, 2015
[ticket/14258] Add event into auth::login before session creation
@marc1706 marc1706 merged commit 9596db9 into phpbb:3.1.x Oct 24, 2015
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
phpBB continuous integration The Bamboo build is a success
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.