mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-03-04 14:36:00 -05:00
* Fix most PHPDocs errors Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103 https://phpstan.org/writing-php-code/phpdoc-types * Avoid func_get_args Use variadic syntax instead https://php.net/manual/functions.arguments#functions.variable-arg-list And avoid dynamic functions names when possible to more easily identify calls and unused functions. Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103 * PHPStan level 3 * PHPStand level 4 * Update default to PHPStan level 4 * Towards level 5 * Fix level 4 regression * Towards level 5 * Pass PHPStan level 5 * Towards level 6 * Remove erronenous regression from changelog https://github.com/FreshRSS/FreshRSS/pull/4116
40 lines
904 B
PHP
40 lines
904 B
PHP
<?php
|
|
|
|
/**
|
|
* Manage the emails sent to the users.
|
|
*/
|
|
class FreshRSS_User_Mailer extends Minz_Mailer {
|
|
|
|
/**
|
|
* @var FreshRSS_View
|
|
*/
|
|
protected $view;
|
|
|
|
public function send_email_need_validation($username, $user_config) {
|
|
Minz_Translate::reset($user_config->language);
|
|
|
|
$this->view->_path('user_mailer/email_need_validation.txt.php');
|
|
|
|
$this->view->username = $username;
|
|
$this->view->site_title = FreshRSS_Context::$system_conf->title;
|
|
$this->view->validation_url = Minz_Url::display(
|
|
array(
|
|
'c' => 'user',
|
|
'a' => 'validateEmail',
|
|
'params' => array(
|
|
'username' => $username,
|
|
'token' => $user_config->email_validation_token
|
|
)
|
|
),
|
|
'txt',
|
|
true
|
|
);
|
|
|
|
$subject_prefix = '[' . FreshRSS_Context::$system_conf->title . ']';
|
|
return $this->mail(
|
|
$user_config->mail_login,
|
|
$subject_prefix . ' ' ._t('user.mailer.email_need_validation.title')
|
|
);
|
|
}
|
|
}
|