Commit ed216fd0 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Merge branch '5850-create-an-invitations-plugin' into '1.4-dev'

Resolve "Create an invitations plugin"

See merge request fusiondirectory/fd-plugins!366
parents dc4a2453 acae748b
......@@ -67,6 +67,9 @@ class invitationPage extends standAlonePage
throw new FusionDirectoryException(sprintf(_('Found several invitations matching token "%s"'), $token));
}
$registration = reset($registrations);
if (empty($registration['fdRegistrationInvitationDN'])) {
throw new FusionDirectoryException(sprintf(_('The invitation matching token "%s" does not exist anymore'), $_GET['token']));
}
}
if ($registration['fdRegistrationState'] != 'sent') {
switch ($registration['fdRegistrationState']) {
......
......@@ -88,6 +88,9 @@ class publicFormPage extends standAlonePage
throw new FusionDirectoryException(sprintf(_('Found several invitations matching token "%s"'), $_GET['token']));
}
$this->registration = reset($registrations);
if (empty($this->registration['fdRegistrationInvitationDN'])) {
throw new FusionDirectoryException(sprintf(_('The invitation matching token "%s" does not exist anymore'), $_GET['token']));
}
$invitations = objects::ls(
'invitation',
array(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment