[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [17342] more on registration
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [17342] more on registration |
Date: |
Tue, 21 Nov 2017 10:12:25 -0500 (EST) |
Revision: 17342
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17342
Author: sigurdne
Date: 2017-11-21 10:12:24 -0500 (Tue, 21 Nov 2017)
Log Message:
-----------
more on registration
Modified Paths:
--------------
trunk/registration/inc/class.bopending.inc.php
trunk/registration/inc/class.soreg.inc.php
Modified: trunk/registration/inc/class.bopending.inc.php
===================================================================
--- trunk/registration/inc/class.bopending.inc.php 2017-11-21 12:42:37 UTC
(rev 17341)
+++ trunk/registration/inc/class.bopending.inc.php 2017-11-21 15:12:24 UTC
(rev 17342)
@@ -230,6 +230,7 @@
*/
function process_users( $data )
{
+ $validator =
CreateObject('phpgwapi.EmailAddressValidator');
$so = createobject('registration.soreg');
$ui = createobject('registration.uireg');
@@ -289,10 +290,18 @@
unset($info['passwd']);
unset($info['passwd_confirm']);
+ if
($validator->check_email_address($reg_info['reg_lid']))
+ {
+ $to = $reg_info['reg_lid'];
+ }
+ else
+ {
+ $to = $info['email'];
+ }
+
try
{
-// $info['email'] =
'address@hidden';
- $rcpt = $smtp->msg('email',
$info['email'], $subject, nl2br($body), '', '', '', $noreply, '', 'html');
+ $rcpt = $smtp->msg('email',
$to, $subject, nl2br($body), '', '', '', $noreply, '', 'html');
}
catch (Exception $e)
{
@@ -301,7 +310,7 @@
if ($rcpt)
{
-
phpgwapi_cache::message_set("Confirmation sent to {$info['email']}", 'message');
+
phpgwapi_cache::message_set("Confirmation sent to {$to}", 'message');
$so->delete_reg_info($reg_id);
}
else
Modified: trunk/registration/inc/class.soreg.inc.php
===================================================================
--- trunk/registration/inc/class.soreg.inc.php 2017-11-21 12:42:37 UTC (rev
17341)
+++ trunk/registration/inc/class.soreg.inc.php 2017-11-21 15:12:24 UTC (rev
17342)
@@ -71,7 +71,7 @@
if ($this->config['username_is'] == 'email')
{
- $fields['email'] = $fields['loginid'];
+ $fields['email'] = $account_lid;
}
$this->db->query("UPDATE phpgw_reg_accounts SET
reg_id='" . $this->reg_id . "', reg_dla='"
@@ -88,10 +88,10 @@
$body = <<<HTML
New user: {$info['n_given']} {$info['n_family']} is pending approval
for
{$GLOBALS['phpgw_info']['server']['system_name']}::{$GLOBALS['phpgw_info']['server']['site_title']}.
- Click on the following link to manage pending approvals.
-
+ Click on the following link to manage pending approvals.
+
<a href='$url'>Login.</a>
-
+
HTML;
$body = nl2br($body);
$subject = lang('Account registration');
@@ -113,14 +113,22 @@
if ($this->config['activate_account'] == 'immediately')
{
- $url = $GLOBALS['phpgw']->link('/login.php',
array('logindomain' => $GLOBALS['phpgw_info']['user']['domain']), false, true);
+ if(!empty($this->config['login_url']))
+ {
+ $url = $this->config['login_url'];
+ }
+ else
+ {
+ $url =
$GLOBALS['phpgw']->link('/login.php', array('logindomain' =>
$GLOBALS['phpgw_info']['user']['domain']), false, true);
+ }
+
$body = <<<HTML
Hi {$info['n_given']} {$info['n_family']},
This is a confirmation email for your new account on
{$GLOBALS['phpgw_info']['server']['system_name']}::{$GLOBALS['phpgw_info']['server']['site_title']}.
- Click on the following link to log into your account.
-
+ Click on the following link to log into your account.
+
<a href='$url'>Login.</a>
User: {$account_lid}
@@ -128,7 +136,7 @@
If you did not request this account, simply ignore this message.
{$support_email_text} {$support_email}
-
+
HTML;
$body = nl2br($body);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [17342] more on registration,
sigurdne <=