Remove Persona support
Persona is no longer supported by Mozilla, so let's remove it.
This commit is contained in:
@ -11,7 +11,7 @@ sub showHelp {
|
||||
print <<EOF;
|
||||
Usage: $0 NAME
|
||||
[--rename-from NAME]
|
||||
[--type hydra|persona]
|
||||
[--type hydra|google]
|
||||
[--full-name FULLNAME]
|
||||
[--email-address EMAIL-ADDRESS]
|
||||
[--password PASSWORD]
|
||||
@ -47,8 +47,8 @@ GetOptions("rename-from=s" => \$renameFrom,
|
||||
die "$0: one user name required\n" if scalar @ARGV != 1;
|
||||
my $userName = $ARGV[0];
|
||||
|
||||
die "$0: type must be `hydra' or `persona'\n"
|
||||
if defined $type && $type ne "hydra" && $type ne "persona";
|
||||
die "$0: type must be `hydra' or `google'\n"
|
||||
if defined $type && $type ne "hydra" && $type ne "google";
|
||||
|
||||
my $db = Hydra::Model::DB->new();
|
||||
|
||||
@ -65,17 +65,17 @@ txn_do($db, sub {
|
||||
{ username => $userName, type => "hydra", emailaddress => "", password => "!" });
|
||||
}
|
||||
|
||||
die "$0: Persona user names must be email addresses\n"
|
||||
if $user->type eq "persona" && $userName !~ /\@/;
|
||||
die "$0: Google user names must be email addresses\n"
|
||||
if $user->type eq "google" && $userName !~ /\@/;
|
||||
|
||||
$user->update({ type => $type }) if defined $type;
|
||||
|
||||
$user->update({ fullname => $fullName eq "" ? undef : $fullName }) if defined $fullName;
|
||||
|
||||
if ($user->type eq "persona") {
|
||||
die "$0: Persona accounts do not have an explicitly set email address.\n"
|
||||
if ($user->type eq "google") {
|
||||
die "$0: Google accounts do not have an explicitly set email address.\n"
|
||||
if defined $emailAddress;
|
||||
die "$0: Persona accounts do not have a password.\n"
|
||||
die "$0: Google accounts do not have a password.\n"
|
||||
if defined $password;
|
||||
$user->update({ emailaddress => $userName, password => "!" });
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user