|
|
@@ -77,7 +77,7 @@ public function refresh(string $refreshToken): ?array
|
|
|
];
|
|
|
}
|
|
|
|
|
|
- public function forgotPassword(string $email): bool
|
|
|
+ public function forgotPassword(string $email, string $portal = 'franchisee'): bool
|
|
|
{
|
|
|
$user = User::where('email', $email)->first();
|
|
|
|
|
|
@@ -96,7 +96,11 @@ public function forgotPassword(string $email): bool
|
|
|
]
|
|
|
);
|
|
|
|
|
|
- $recoveryLink = config('app.franchisee_url') . '/recovery-password?email=' . urlencode($email);
|
|
|
+ $baseUrl = $portal === 'franchisor'
|
|
|
+ ? config('app.franchisor_url')
|
|
|
+ : config('app.franchisee_url');
|
|
|
+
|
|
|
+ $recoveryLink = $baseUrl . '/recovery-password?email=' . urlencode($email);
|
|
|
|
|
|
Mail::to($email)->send(new PasswordResetCodeMail($code, $recoveryLink));
|
|
|
|