diff options
author | lpsolit%gmail.com <> | 2006-05-08 05:13:47 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2006-05-08 05:13:47 +0200 |
commit | ece3a7ec4685b281efee69286a4dbdeb44971661 (patch) | |
tree | a7cf408860ea24421ded09f46dc4d680cc5f19fa /globals.pl | |
parent | 46c78a8c7c42bfdf47ee1f68939aa122371b9662 (diff) | |
download | bugzilla-ece3a7ec4685b281efee69286a4dbdeb44971661.tar.gz bugzilla-ece3a7ec4685b281efee69286a4dbdeb44971661.tar.xz |
Bug 332598: Move ValidatePassword() and DBNameToIdAndCheck() from globals.pl into User.pm - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=myk
Diffstat (limited to 'globals.pl')
-rw-r--r-- | globals.pl | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/globals.pl b/globals.pl index ac95974d2..ad6cfd761 100644 --- a/globals.pl +++ b/globals.pl @@ -204,22 +204,6 @@ sub AnyDefaultGroups { return $::CachedAnyDefaultGroups; } -sub ValidatePassword { - # Determines whether or not a password is valid (i.e. meets Bugzilla's - # requirements for length and content). - # If a second password is passed in, this function also verifies that - # the two passwords match. - my ($password, $matchpassword) = @_; - - if (length($password) < 3) { - ThrowUserError("password_too_short"); - } elsif (length($password) > 16) { - ThrowUserError("password_too_long"); - } elsif ((defined $matchpassword) && ($password ne $matchpassword)) { - ThrowUserError("passwords_dont_match"); - } -} - sub DBID_to_name { my ($id) = (@_); return "__UNKNOWN__" if !defined $id; @@ -242,16 +226,6 @@ sub DBID_to_name { return $::cachedNameArray{$id}; } -sub DBNameToIdAndCheck { - my ($name) = (@_); - my $result = login_to_id($name); - if ($result > 0) { - return $result; - } - - ThrowUserError("invalid_username", { name => $name }); -} - sub get_product_id { my ($prod) = @_; PushGlobalSQLState(); |