diff --git a/app/Console/Commands/ChangeEmail.php b/app/Console/Commands/ChangeEmail.php new file mode 100755 index 00000000..8bc17d88 --- /dev/null +++ b/app/Console/Commands/ChangeEmail.php @@ -0,0 +1,50 @@ +argument('email'))->get(); + if(sizeof($u) > 0){ + $u = $u[0]; + //$this->info($u->password); + $u->email = $this->argument('newemail'); + $u->save(); + $this->info('Email Changed!'); + }else{ + $this->error('This email isnt linked to a MinePoS admin account!'); + } + } +} diff --git a/app/Console/Commands/ResetPassword.php b/app/Console/Commands/ResetPassword.php new file mode 100755 index 00000000..35163ef5 --- /dev/null +++ b/app/Console/Commands/ResetPassword.php @@ -0,0 +1,51 @@ +argument('email'))->get(); + if(sizeof($u) > 0){ + $u = $u[0]; + //$this->info($u->password); + $u->password = \Hash::make($this->argument('passwd')); + $u->save(); + $this->info('Password Changed!'); + }else{ + $this->error('This email isnt linked to a MinePoS admin account!'); + } + } +}