Skip to content

Commit

Permalink
forgotten fix in IdP.php with support for the notify_nro constant
Browse files Browse the repository at this point in the history
  • Loading branch information
twoln committed Mar 25, 2024
1 parent 3be856b commit c918e0f
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions core/IdP.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function __construct(int $instId)
$eligType = IdP::TYPE_SP . "";
}
$this->type = $eligType;
$this->loggerInstance->debug(3, "--- END Constructing new IdP object ... ---\n");
$this->loggerInstance->debug(4, "--- END Constructing new IdP object ... ---\n");
}

/**
Expand Down Expand Up @@ -390,20 +390,21 @@ public function destroy()
$this->databaseHandle->exec("DELETE FROM institution WHERE inst_id = $this->identifier");

// notify federation admins
if (\config\Master::MAILSETTINGS['notify_nro']) {
$fed = new Federation($this->federation);
foreach ($fed->listFederationAdmins() as $id) {
$user = new User($id);
$message = sprintf(_("Hi,
$fed = new Federation($this->federation);
foreach ($fed->listFederationAdmins() as $id) {
$user = new User($id);
$message = sprintf(_("Hi,
the %s %s in your %s federation %s has been deleted from %s.
the %s %s in your %s federation %s has been deleted from %s.
We thought you might want to know.
We thought you might want to know.
Best regards,
Best regards,
%s"), common\Entity::$nomenclature_participant, $this->name, \config\ConfAssistant::CONSORTIUM['display_name'], strtoupper($fed->name), \config\Master::APPEARANCE['productname'], \config\Master::APPEARANCE['productname_long']);
$user->sendMailToUser(sprintf(_("%s in your federation was deleted"), common\Entity::$nomenclature_participant), $message);
%s"), common\Entity::$nomenclature_participant, $this->name, \config\ConfAssistant::CONSORTIUM['display_name'], strtoupper($fed->name), \config\Master::APPEARANCE['productname'], \config\Master::APPEARANCE['productname_long']);
$user->sendMailToUser(sprintf(_("%s in your federation was deleted"), common\Entity::$nomenclature_participant), $message);
}
}
common\Entity::outOfThePotatoes();
}
Expand Down

0 comments on commit c918e0f

Please sign in to comment.