feat: add ClinicInvitationWebController and related templates for handling clinic invitations
- Implemented ClinicInvitationWebController to manage the invitation process via web. - Added view and respond methods to handle invitation display and responses. - Created result.html.twig and view.html.twig templates for rendering invitation results and views. - Integrated CSRF protection for form submissions. - Established routes for invitation viewing and responding.
This commit is contained in:
@@ -74,7 +74,7 @@ class ClinicDoctorInvitation
|
||||
$this->clinic = $clinic;
|
||||
$this->invitedBy = $invitedBy;
|
||||
$this->mobile = $mobile;
|
||||
$this->token = bin2hex(random_bytes(16));
|
||||
$this->token = bin2hex(random_bytes(6));
|
||||
$this->invitedAt = time();
|
||||
$this->expiresAt = $this->invitedAt + 72 * 3600;
|
||||
}
|
||||
@@ -94,7 +94,7 @@ class ClinicDoctorInvitation
|
||||
|
||||
public function refresh(): void
|
||||
{
|
||||
$this->token = bin2hex(random_bytes(16));
|
||||
$this->token = bin2hex(random_bytes(6));
|
||||
$this->tokenUsed = false;
|
||||
$this->invitedAt = time();
|
||||
$this->expiresAt = $this->invitedAt + 72 * 3600;
|
||||
|
||||
Reference in New Issue
Block a user