taylornetwork/laravel-username-generator

Not respecting nouns/adjectives in config

john-climer opened this issue · 2 comments

I tried adding a small list of words (nouns and adjectives) in the dictionary config but I am still getting usernames with words not in the list.
In /config/username_generator.php:

    /*
     * Add your own adjective and nouns word lists here if don't want to use the default
     */
    'dictionary' => [
        'adjectives' => ['sly','smart','sneaky'],
        'nouns'      => ['fox','rabbit','mouse'],
    ],

And generating a username with this method:

$username = UsernameGenerator::generate();

I also tried clearing config cache in laravel but still getting results like "invitingbuccane".

Fyi I opened a PR to address it: #45

@john-climer thanks for the catch and the quick fix! I've released v2.5.1 which addresses the issue with your PR

Thanks again! :)