File: D:/HostingSpaces/SBogers10/base.komma.pro/vendor/komma/kms/src/Auth/AuthMailService.php
<?php
namespace Komma\KMS\Auth;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Support\Facades\Password;
use Komma\KMS\Notifications\KmsResetPasswordNotification;
use Komma\KMS\Notifications\KmsSetPasswordNotification;
/**
* Class AuthMailService
*
* A service responsible for sending mails about authorisation and authentication.
*
* @package App\Auth
*/
class AuthMailService implements AuthMailServiceInterface
{
/**
* Notify user that he needs to set a password to login
*
* @param Authenticatable $newUser
* @return null
*/
public function notifyUserToSetPassword(Authenticatable $newUser)
{
$token = Password::getRepository()->create($newUser);
$newUser->notify(new KmsSetPasswordNotification($newUser, $token));
return null;
}
/**
* Notify user that he needs to set a password to login
*
* @param Authenticatable $newUser
* @return null
*/
public function notifyUserToResetPassword(Authenticatable $newUser)
{
$token = Password::getRepository()->create($newUser);
$newUser->notify(new KmsResetPasswordNotification($newUser, $token));
return null;
}
}