protected static function SendEmailForActivation(
\Admin $admin, string $activationLink, string $email)
{
// Below variables are used in email template.
$adminName = $admin->displayName();
$activationUrl = $activationLink;
$logo = \Registry::siteUrl('/dns_full_logo.png');
/* send mail */
ob_start();
eval(\Registry::template('EmailAccountActivation'));
$bodyHtml = ob_get_clean();
The template is sending the username in the email after retrieving it as “adminName”.
Additionally, I need to retrieve the department name and assigned role from the database. Could you please provide guidance on the process to retrieve this information?