Skip to content

Commit 5927a0d

Browse files
authored
Merge pull request #91 from 2mxdev/master
bugfixed
2 parents 7e4cbe5 + 0e1a3da commit 5927a0d

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

UserModule.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,13 @@ public static function getAdmins() {
224224
/**
225225
* Send to user mail
226226
*/
227-
public static function sendMail($email,$subject,$message) {
228-
$adminEmail = Yii::app()->params['adminEmail'];
229-
$headers = "MIME-Version: 1.0\r\nFrom: $adminEmail\r\nReply-To: $adminEmail\r\nContent-Type: text/html; charset=utf-8";
227+
public static function sendMail($email,$subject,$message,$from='',$cc='') {
228+
if (!$from)
229+
$from = Yii::app()->params['adminEmail'];
230+
$headers = "MIME-Version: 1.0\r\nFrom: $from\r\nReply-To: $from\r\nContent-Type: text/html; charset=utf-8\r\n";
231+
if ($cc) {
232+
$headers .= "Cc: ".$cc."\r\n";
233+
}
230234
$message = wordwrap($message, 70);
231235
$message = str_replace("\n.", "\n..", $message);
232236
return mail($email,'=?UTF-8?B?'.base64_encode($subject).'?=',$message,$headers);

messages/ru/user.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,6 @@
129129
'Search' => 'Искать',
130130
'Advanced Search' => 'Расширенный поиск',
131131
'You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b> or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.'=>'Вы можете использовать операторы сравнения (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b> or <b>=</b>) установив их перед значением.',
132+
'You have requested the password recovery site {site_name}' => 'Запрос на восстановление пароля на сайте {site_name}',
132133
);
133134

models/UserRecoveryForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function rules()
1818
return array(
1919
// username and password are required
2020
array('login_or_email', 'required'),
21-
array('login_or_email', 'match', 'pattern' => '/^[[email protected]\s,]+$/u','message' => UserModule::t("Incorrect symbols (A-z0-9).")),
21+
array('login_or_email', 'match', 'pattern' => '/^[A-Za-z0-9@.\-\s,]+$/u','message' => UserModule::t("Incorrect symbols (A-z0-9).")),
2222
// password needs to be authenticated
2323
array('login_or_email', 'checkexists'),
2424
);

0 commit comments

Comments
 (0)