diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2015-02-26 15:29:04 +0100 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2015-02-26 15:29:04 +0100 |
commit | a7b4b1ba18e33383e0f5723587ba40ddcdf82a91 (patch) | |
tree | 31cc0f26153cf54e13275229897d3dbac744db19 /Bugzilla | |
parent | d96dbf24caaffe018ef23912c7bb0c95b36ecd2a (diff) | |
download | bugs-a7b4b1ba18e33383e0f5723587ba40ddcdf82a91.tar bugs-a7b4b1ba18e33383e0f5723587ba40ddcdf82a91.tar.gz bugs-a7b4b1ba18e33383e0f5723587ba40ddcdf82a91.tar.bz2 bugs-a7b4b1ba18e33383e0f5723587ba40ddcdf82a91.tar.xz bugs-a7b4b1ba18e33383e0f5723587ba40ddcdf82a91.zip |
Bug 1061271: Add a hook into Bugzilla::User::check_and_send_account_creation_confirmation()
r=gerv a=glob
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Hook.pm | 18 | ||||
-rw-r--r-- | Bugzilla/User.pm | 4 |
2 files changed, 22 insertions, 0 deletions
diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm index 430d5af49..d6ba5e1d0 100644 --- a/Bugzilla/Hook.pm +++ b/Bugzilla/Hook.pm @@ -1526,6 +1526,24 @@ name), you can get it from here. =back +=head2 user_check_account_creation + +This hook permits you to do extra checks before the creation of a new user +account. This hook is called after email address validation has been done. +Note that this hook can also access the IP address of the requester thanks +to the C<remote_ip()> subroutine exported by C<Bugzilla::Util>. + +Params: + +=over + +=item C<login> + +The login of the new account. This is usually an email address, unless the +C<emailsuffix> parameter is not empty. + +=back + =head2 user_preferences This hook allows you to add additional panels to the User Preferences page, diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index acedc65f2..e7d2fbafe 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -21,6 +21,7 @@ use Bugzilla::Classification; use Bugzilla::Field; use Bugzilla::Group; use Bugzilla::BugUserLastVisit; +use Bugzilla::Hook; use DateTime::TimeZone; use List::Util qw(max); @@ -2409,6 +2410,9 @@ sub check_and_send_account_creation_confirmation { ThrowUserError('account_creation_restricted'); } + # Allow extensions to do extra checks. + Bugzilla::Hook::process('user_check_account_creation', { login => $login }); + # Create and send a token for this new account. require Bugzilla::Token; Bugzilla::Token::issue_new_user_account_token($login); |