Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/worthmine/yaml-username-ban


https://github.com/worthmine/yaml-username-ban

user-management yaml

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# YAML-username-ban

## in perl
```
use YAML::XS qw( LoadFile );
use Plack::Request;

my $req = Plack::Request->new($env);
my %param = %{ $req->body_parameters };

my $y = LoadFile( './common/static/ban.yaml' );
my @ban = @{ $y->{'ban'} };
die 'そのユニークユーザーIDはシステムにより予約されています。 username=' . $param{'username'}
if $param{'username'} and grep{ lc( $param{'username'} ) eq lc($_) } @ban;
```