Allow people with siteadmin:usernames to override the check for a valid
username.
Patch by denise.
diffs (15 lines):
diff -r f87be08847c5 -r 2f9819acdf88 cgi-bin/LJ/User.pm
--- a/cgi-bin/LJ/User.pm Sun Jun 14 18:12:35 2009 +0000
+++ b/cgi-bin/LJ/User.pm Sun Jun 14 18:15:55 2009 +0000
@@ -341,6 +341,11 @@ sub is_protected_username {
sub is_protected_username {
my ( $class, $username ) = @_;
+ # site admins (people with siteadmin:usernames) can override this check and
+ # create any account they want
+ my $remote = LJ::get_remote();
+ return 0 if $remote && $remote->has_priv( siteadmin => 'usernames' );
+
my @res = grep { $_ } split( /\r?\n/, LJ::load_include(
'reserved-usernames' ) );
foreach my $re ( @res ) {
return 1 if $username =~ /$re/;
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog