logo       

cvs: pearweb /include/Damblan/Mail pearweb_account_request.tpl.php /public: msg#00013

php.pear.core

Subject: cvs: pearweb /include/Damblan/Mail pearweb_account_request.tpl.php /public_html account-request.php

arnaud Sat Oct 14 16:23:25 2006 UTC

Added files:
/pearweb/include/Damblan/Mail pearweb_account_request.tpl.php

Modified files:
/pearweb/public_html account-request.php
Log:
send an email to me when a user requests a pearweb account


http://cvs.php.net/viewvc.cgi/pearweb/public_html/account-request.php?r1=1.62&r2=1.63&diff_format=u
Index: pearweb/public_html/account-request.php
diff -u pearweb/public_html/account-request.php:1.62
pearweb/public_html/account-request.php:1.63
--- pearweb/public_html/account-request.php:1.62 Sat Jan 7 19:14:58 2006
+++ pearweb/public_html/account-request.php Sat Oct 14 16:23:25 2006
@@ -15,12 +15,13 @@
+----------------------------------------------------------------------+
| Authors: |
+----------------------------------------------------------------------+
- $Id: account-request.php,v 1.62 2006/01/07 19:14:58 danielc Exp $
+ $Id: account-request.php,v 1.63 2006/10/14 16:23:25 arnaud Exp $
*/

define('HTML_FORM_TH_ATTR', 'class="form-label_left"');
define('HTML_FORM_TD_ATTR', 'class="form-input"');
require_once 'HTML/Form.php';
+require_once 'Damblan/Mailer.php';

$display_form = true;
$width = 60;
@@ -29,7 +30,7 @@

$stripped = array_map('strip_tags', $_POST);

-// CAPTCHA needs it and we cannot start it in the
+// CAPTCHA needs it and we cannot start it in the
// CAPTCHA function, too much mess around here.
session_start();

@@ -89,6 +90,15 @@
. ' time people have.'
. ' You will get an email when your account is open,'
. ' or if your request was rejected for some reason.');
+
+ $mailData = array(
+ 'username' => $stripped['handle'],
+ 'firstname' => $stripped['firstname'],
+ 'lastname' => $stripped['lastname'],
+ );
+ $mailer = Damblan_Mailer::create('pearweb_account_request',
$mailData);
+ $additionalHeaders['To'] = '"Arnaud Limbourg"
<arnaud@xxxxxxxxxxxx>';
+ $mailer->send($additionalHeaders);
} elseif ($ok === false) {
$msg = 'Your account request has been submitted, but there'
. ' were problems mailing one or more administrators.'
@@ -169,7 +179,7 @@

<p>
If your first name or last name begins with a non-latin character like
-vowels with accents you cannot use those due to strict validation
+vowels with accents you cannot use those due to strict validation
routines. Please use the &quot;latin counterparts&quot; of those
characters instead.
</p>

http://cvs.php.net/viewvc.cgi/pearweb/include/Damblan/Mail/pearweb_account_request.tpl.php?view=markup&rev=1.1
Index: pearweb/include/Damblan/Mail/pearweb_account_request.tpl.php
+++ pearweb/include/Damblan/Mail/pearweb_account_request.tpl.php
<?php

/**
* Used variables in this template:
*
* %username% username of the requested account
* %firstname% first name of the person requesting the account
* %lastname% last name of the person requesting the account
*/

$tpl = array(
'Reply-To' => array('PEAR Webmaster <' . PEAR_WEBMASTER_EMAIL . '>'),
'From' => 'pear-sys@xxxxxxx',
'Subject' => '[ACCOUNT-REQUEST] Account request : %username%',
'Body' => 'An account has been requested by %firstname% %lastname%

To handle the request please click on the following link:
Delete: http://' . PEAR_CHANNELNAME . '/admin/index.php?acreq=%username%'
);

?>



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise