X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fregister.php;h=5e011cb9a94a0edd358cb1aa1ccdb974e80a52e7;hb=599bc1eb0a01d292b41a064019b65e70e6d6e821;hp=6bf287d4245b0c70ce12d3395b9f4ad216216d10;hpb=2bdbdc8d8ef229946e225791801e753a7fd5c695;p=friendica.git diff --git a/mod/register.php b/mod/register.php index 6bf287d424..5e011cb9a9 100644 --- a/mod/register.php +++ b/mod/register.php @@ -1,5 +1,8 @@ config['register_policy']) { - + case REGISTER_OPEN: $blocked = 0; $verified = 1; @@ -42,6 +45,7 @@ function register_post(&$a) { $verified = 0; break; } + require_once('include/user.php'); @@ -85,9 +89,9 @@ function register_post(&$a) { '$password' => $result['password'], '$uid' => $user['uid'] )); - $res = mail($user['email'], sprintf(t('Registration details for %s'), $a->config['sitename']), + $res = mail($user['email'], email_header_encode( sprintf( t('Registration details for %s'), $a->config['sitename']),'UTF-8'), $email_tpl, - 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n" + 'From: ' . 'Administrator' . '@' . $_SERVER['SERVER_NAME'] . "\n" . 'Content-type: text/plain; charset=UTF-8' . "\n" . 'Content-transfer-encoding: 8bit' ); @@ -115,8 +119,11 @@ function register_post(&$a) { dbesc($lang) ); + $adminlist = explode(",", str_replace(" ", "", $a->config['admin_email'])); + $r = q("SELECT `language` FROM `user` WHERE `email` = '%s' LIMIT 1", - dbesc($a->config['admin_email']) + //dbesc($a->config['admin_email']) + dbesc($adminlist[0]) ); if(count($r)) push_lang($r[0]['language']); @@ -139,9 +146,9 @@ function register_post(&$a) { '$hash' => $hash )); - $res = mail($a->config['admin_email'], sprintf(t('Registration request at %s'), $a->config['sitename']), + $res = mail($a->config['admin_email'], email_header_encode( sprintf(t('Registration request at %s'), $a->config['sitename']),'UTF-8'), $email_tpl, - 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n" + 'From: ' . 'Administrator' . '@' . $_SERVER['SERVER_NAME'] . "\n" . 'Content-type: text/plain; charset=UTF-8' . "\n" . 'Content-transfer-encoding: 8bit' ); @@ -234,11 +241,10 @@ function register_content(&$a) { '$yes_selected' => ' checked="checked" ', '$no_selected' => '', '$str_yes' => t('Yes'), - '$str_no' => t('No') + '$str_no' => t('No'), )); } - $license = ''; $o = get_markup_template("register.tpl"); @@ -247,6 +253,8 @@ function register_content(&$a) { call_hooks('register_form',$arr); + $o = $arr['template']; + $o = replace_macros($o, array( '$oidhtml' => $oidhtml, '$invitations' => get_config('system','invitation_only'), @@ -256,7 +264,7 @@ function register_content(&$a) { '$realpeople' => $realpeople, '$regtitle' => t('Registration'), '$registertext' =>((x($a->config,'register_text')) - ? '
' . $a->config['register_text'] . '
' + ? bbcode($a->config['register_text']) : "" ), '$fillwith' => $fillwith, '$fillext' => $fillext, @@ -264,7 +272,7 @@ function register_content(&$a) { '$openid' => $openid_url, '$namelabel' => t('Your Full Name ' . "\x28" . 'e.g. Joe Smith' . "\x29" . ': '), '$addrlabel' => t('Your Email Address: '), - '$nickdesc' => t('Choose a profile nickname. This must begin with a text character. Your profile address on this site will then be \'nickname@$sitename\'.'), + '$nickdesc' => str_replace('$sitename',$a->get_hostname(),t('Choose a profile nickname. This must begin with a text character. Your profile address on this site will then be \'nickname@$sitename\'.')), '$nicklabel' => t('Choose a nickname: '), '$photo' => $photo, '$publish' => $profile_publish, @@ -273,7 +281,10 @@ function register_content(&$a) { '$email' => $email, '$nickname' => $nickname, '$license' => $license, - '$sitename' => $a->get_hostname() + '$sitename' => $a->get_hostname(), + '$importh' => t('Import'), + '$importt' => t('Import your profile to this friendica instance'), + )); return $o;