[GH-ISSUE #55] Ability to create a user through artisan #95

Closed
opened 2026-03-01 17:44:45 +03:00 by kerem · 4 comments
Owner

Originally created by @crazy-max on GitHub (Jul 22, 2020).
Original GitHub issue: https://github.com/anonaddy/anonaddy/issues/55

Hi @willbrowningme,

It would be nice to allow creation of user through artisan with something like:

$ php artisan user:add --password=mypwd --email=anonaddy@example.com --role=admin --no-ansi --no-interaction anonaddy

This way we could remove the static DatabaseSeeder.php for our Docker image and let the user decide its credentials.

Originally created by @crazy-max on GitHub (Jul 22, 2020). Original GitHub issue: https://github.com/anonaddy/anonaddy/issues/55 Hi @willbrowningme, It would be nice to allow creation of user through artisan with something like: ```shell $ php artisan user:add --password=mypwd --email=anonaddy@example.com --role=admin --no-ansi --no-interaction anonaddy ``` This way we could remove the static [`DatabaseSeeder.php`](https://github.com/crazy-max/docker-anonaddy/blob/master/rootfs/var/www/anonaddy/database/seeds/DatabaseSeeder.php) for our Docker image and let the user decide its credentials.
kerem closed this issue 2026-03-01 17:44:46 +03:00
Author
Owner

@willbrowningme commented on GitHub (Jul 29, 2020):

Hi, I'm not too familiar with the docker image but is there any reason why you cannot just use the /register page to register the initial user account?

<!-- gh-comment-id:665568244 --> @willbrowningme commented on GitHub (Jul 29, 2020): Hi, I'm not too familiar with the docker image but is there any reason why you cannot just use the /register page to register the initial user account?
Author
Owner

@crazy-max commented on GitHub (Jul 29, 2020):

Hi @willbrowningme,

Hi, I'm not too familiar with the docker image but is there any reason why you cannot just use the /register page to register the initial user account?

Yes we could do that but how can we create an admin user?

<!-- gh-comment-id:665763578 --> @crazy-max commented on GitHub (Jul 29, 2020): Hi @willbrowningme, > Hi, I'm not too familiar with the docker image but is there any reason why you cannot just use the /register page to register the initial user account? Yes we could do that but how can we create an admin user?
Author
Owner

@willbrowningme commented on GitHub (Jul 31, 2020):

There isn't really an admin user as such, you would just need to register a user normally and then add this to your .env file.

ANONADDY_ADMIN_USERNAME=johndoe

Then it will allow the default yourdomain.com to behave as a catch-all.

Then you can disable registration for anyone else by adding

ANONADDY_ENABLE_REGISTRATION=false

to your .env file and refreshing the cache (php artisan config:cache).

<!-- gh-comment-id:667036038 --> @willbrowningme commented on GitHub (Jul 31, 2020): There isn't really an admin user as such, you would just need to register a user normally and then add this to your `.env` file. `ANONADDY_ADMIN_USERNAME=johndoe` Then it will allow the default yourdomain.com to behave as a catch-all. Then you can disable registration for anyone else by adding `ANONADDY_ENABLE_REGISTRATION=false` to your `.env` file and refreshing the cache (`php artisan config:cache`).
Author
Owner

@crazy-max commented on GitHub (Aug 1, 2020):

@willbrowningme Ok sounds good to me, I will add a note about that for the Docker image.

<!-- gh-comment-id:667529598 --> @crazy-max commented on GitHub (Aug 1, 2020): @willbrowningme Ok sounds good to me, I will add a note about that for the Docker image.
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/anonaddy#95
No description provided.