Skip to content
Extraits de code Groupes Projets
Valider 915b324b rédigé par mattpiwik's avatar mattpiwik
Parcourir les fichiers

- fix #527 (Make the email 'from' address configurable in one of the ini files)

; email address that appears as a Sender in the password recovery email
; if specified, {DOMAIN} will be replaced by the current Piwik domain
login_password_recovery_email_address = "password-recovery@{DOMAIN}"

; name that appears as a Sender in the password recovery email
login_password_recovery_email_name = Piwik



git-svn-id: http://dev.piwik.org/svn/trunk@893 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent a5686806
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -64,7 +64,7 @@ PluginsInstalled[] = Installation ...@@ -64,7 +64,7 @@ PluginsInstalled[] = Installation
[Debug] [Debug]
; if set to true, the archiving process will always be triggered, even if the archive has already been computed ; if set to true, the archiving process will always be triggered, even if the archive has already been computed
; this is useful when making changes to the archiving code so we can force the archiving process ; this is useful when making changes to the archiving code so we can force the archiving process
always_archive_data = false always_archive_data = true
; if set to true, all the SQL queries will be recorded by the profiler ; if set to true, all the SQL queries will be recorded by the profiler
; and a profiling summary will be printed at the end of the request ; and a profiling summary will be printed at the end of the request
...@@ -74,7 +74,7 @@ enable_sql_profiler = false ...@@ -74,7 +74,7 @@ enable_sql_profiler = false
; Time in seconds after which an archive will be computed again. ; Time in seconds after which an archive will be computed again.
; This setting is used only for today's statistics. ; This setting is used only for today's statistics.
; Defaults to 10 seconds so that by default, Piwik provides real time reporting. ; Defaults to 10 seconds so that by default, Piwik provides real time reporting.
time_before_archive_considered_outdated = 10 time_before_archive_considered_outdated = 1000
; When loading piwik interface, we redirect the user to 'yesterday' statistics by default ; When loading piwik interface, we redirect the user to 'yesterday' statistics by default
; Possible values: yesterday, today, or any YYYY-MM-DD ; Possible values: yesterday, today, or any YYYY-MM-DD
...@@ -130,6 +130,13 @@ login_cookie_name = piwik_auth ...@@ -130,6 +130,13 @@ login_cookie_name = piwik_auth
; login cookie expiration (30 days) ; login cookie expiration (30 days)
login_cookie_expire = 2592000 login_cookie_expire = 2592000
; email address that appears as a Sender in the password recovery email
; if specified, {DOMAIN} will be replaced by the current Piwik domain
login_password_recovery_email_address = "password-recovery@{DOMAIN}"
; name that appears as a Sender in the password recovery email
login_password_recovery_email_name = Piwik
; during archiving, Piwik will limit the number of results recorded, for performance reasons ; during archiving, Piwik will limit the number of results recorded, for performance reasons
; maximum number of rows for any of the Referers tables (keywords, search engines, campaigns, etc.) ; maximum number of rows for any of the Referers tables (keywords, search engines, campaigns, etc.)
datatable_archiving_maximum_rows_referers = 500 datatable_archiving_maximum_rows_referers = 500
......
...@@ -171,13 +171,17 @@ class Piwik_Login_Controller extends Piwik_Controller ...@@ -171,13 +171,17 @@ class Piwik_Login_Controller extends Piwik_Controller
sprintf(Piwik_Translate('Login_MailPasswordRecoveryBody'), $login, $randomPassword, Piwik_Url::getCurrentUrlWithoutQueryString()) sprintf(Piwik_Translate('Login_MailPasswordRecoveryBody'), $login, $randomPassword, Piwik_Url::getCurrentUrlWithoutQueryString())
) )
); );
$host = $_SERVER['HTTP_HOST']; $piwikHost = $_SERVER['HTTP_HOST'];
if(strlen($host) == 0) if(strlen($piwikHost) == 0)
{ {
$host = 'piwik.org'; $piwikHost = 'piwik.org';
} }
$mail->setFrom('password-recovery@'.$host, 'Piwik');
$fromEmailName = Zend_Registry::get('config')->General->login_password_recovery_email_name;
$fromEmailAddress = Zend_Registry::get('config')->General->login_password_recovery_email_address;
$fromEmailAddress = str_replace('{DOMAIN}', $piwikHost, $fromEmailAddress);
$mail->setFrom($fromEmailAddress, $fromEmailName);
@$mail->send(); @$mail->send();
} }
catch(Exception $e) catch(Exception $e)
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter