summaryrefslogtreecommitdiffstats
path: root/editusers.cgi
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-09-01 07:01:20 +0200
committerByron Jones <glob@mozilla.com>2015-09-01 07:01:20 +0200
commit421ff7f194875db9634ea783d9dd5b6111f19df3 (patch)
tree5806e9f3001fa4f33ba85aa94856b70a7f878cf8 /editusers.cgi
parentbcc93f83a64a76cd73501eaefaf5fd073fbc3f0d (diff)
downloadbugzilla-421ff7f194875db9634ea783d9dd5b6111f19df3.tar.gz
bugzilla-421ff7f194875db9634ea783d9dd5b6111f19df3.tar.xz
Bug 1197073 - add support for 2fa using totp (eg. google authenticator)
Diffstat (limited to 'editusers.cgi')
-rwxr-xr-xeditusers.cgi4
1 files changed, 4 insertions, 0 deletions
diff --git a/editusers.cgi b/editusers.cgi
index bb23279ff..41e247229 100755
--- a/editusers.cgi
+++ b/editusers.cgi
@@ -270,6 +270,10 @@ if ($action eq 'search') {
? $cgi->param('password_change_reason')
: ''
);
+ if ($user->in_group('admin') && $cgi->param('mfa') eq '') {
+ $otherUser->set_mfa('');
+ Bugzilla->audit(sprintf('%s disabled 2FA for %s', $user->login, $otherUser->login));
+ }
$changes = $otherUser->update();
}