joepriest/passwordreset

This package is abandoned and no longer maintained. The author suggests using the joepriest/laravel-password-reset package instead.

A a console command to reset user passwords

1.3 2018-02-16 16:25 UTC

This package is auto-updated.

Last update: 2023-07-30 17:49:04 UTC


README

A simple artisan command to reset user passwords.

Latest Stable Version Total Downloads License

Installation

Install the package via Composer:

$ composer require joepriest/passwordreset

If you're using a version of Laravel prior to 5.5, add the service provider to config/app.php.

'providers' => [
    // ...
    JoePriest\PasswordReset\PasswordResetServiceProvider::class,
];

Configuration

The command uses default settings for the user model, and the name and password fields. If you wish to override these settings, publish the configuration file:

php artisan vendor:publish

Then alter the options in config/passwordreset.php.

Usage

To reset a password, run user:resetpassword from your console.

php artisan user:resetpassword {user_id?} {new_password?} {--random}

If no user id is provided, you will be asked to choose a user (this defaults to the name field but can be overriden).

If no new password is provided, and the random flag is not set, you will be asked for one (a random one will be suggested).