for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Anomaly\UsersModule\User;
use Anomaly\UsersModule\User\Contract\UserInterface;
use Anomaly\UsersModule\User\Password\Command\ResetPassword;
use Anomaly\UsersModule\User\Password\Command\SendResetEmail;
use Anomaly\UsersModule\User\Password\Command\StartPasswordReset;
use Illuminate\Foundation\Bus\DispatchesJobs;
/**
* Class UserPassword
*
* @link http://pyrocms.com/
* @author PyroCMS, Inc. <[email protected]>
* @author Ryan Thompson <[email protected]>
*/
class UserPassword
{
use DispatchesJobs;
* Start a password reset.
* @param UserInterface $user
* @return bool
public function forgot(UserInterface $user)
return $this->dispatch(new StartPasswordReset($user));
}
* Reset a user's password.
* @param $code
* @param $password
public function reset(UserInterface $user, $code, $password)
return $this->dispatch(new ResetPassword($user, $code, $password));
* @param string $reset
public function send(UserInterface $user, $reset = '/')
return $this->dispatch(new SendResetEmail($user, $reset));