cvs: pearweb /public_html account-request-existingpackage.php account-request-newpackage.php account-request-vote.php

[email protected] ("Helgi ?ormar ?orbj?rnsson") Thu, 08 May 2008 18:15:40 -0000
Newsgroups php.pear.cvs,php.pear.core
Message-ID <cvsdufuz1210270540@cvsserver>
dufuz		Thu May  8 18:15:40 2008 UTC

  Modified files:              
    /pearweb/public_html	account-request-existingpackage.php 
                        	account-request-newpackage.php 
                        	account-request-vote.php 
  Log:
  Add check is the user already exist on two missing pages and reword the error msg
  
http://cvs.php.net/viewvc.cgi/pearweb/public_html/account-request-existingpackage.php?r1=1.8&r2=1.9&diff_format=u
Index: pearweb/public_html/account-request-existingpackage.php
diff -u pearweb/public_html/account-request-existingpackage.php:1.8 pearweb/public_html/account-request-existingpackage.php:1.9
--- pearweb/public_html/account-request-existingpackage.php:1.8	Sun Jan 20 05:10:41 2008
+++ pearweb/public_html/account-request-existingpackage.php	Thu May  8 18:15:40 2008
@@ -15,7 +15,7 @@
    +----------------------------------------------------------------------+
    | Authors:                                                             |
    +----------------------------------------------------------------------+
-   $Id: account-request-existingpackage.php,v 1.8 2008/01/20 05:10:41 dufuz Exp $
+   $Id: account-request-existingpackage.php,v 1.9 2008/05/08 18:15:40 dufuz Exp $
 */
 
 require_once 'HTML/QuickForm.php';
@@ -81,6 +81,11 @@
         //  The add method performs further validation then creates the account
         include_once 'pear-database-user.php';
         $ok = user::add($stripped);
+        if (PEAR::isError($ok)) {
+            $errors[] = 'This email address has already been registered by another user';
+            $display_form = true;
+            break;
+        }
 
         if (!empty($stripped['jumpto'])) {
             $jumpto = $stripped['jumpto'];
http://cvs.php.net/viewvc.cgi/pearweb/public_html/account-request-newpackage.php?r1=1.9&r2=1.10&diff_format=u
Index: pearweb/public_html/account-request-newpackage.php
diff -u pearweb/public_html/account-request-newpackage.php:1.9 pearweb/public_html/account-request-newpackage.php:1.10
--- pearweb/public_html/account-request-newpackage.php:1.9	Sun Jan 20 05:10:41 2008
+++ pearweb/public_html/account-request-newpackage.php	Thu May  8 18:15:40 2008
@@ -15,7 +15,7 @@
    +----------------------------------------------------------------------+
    | Authors:                                                             |
    +----------------------------------------------------------------------+
-   $Id: account-request-newpackage.php,v 1.9 2008/01/20 05:10:41 dufuz Exp $
+   $Id: account-request-newpackage.php,v 1.10 2008/05/08 18:15:40 dufuz Exp $
 */
 
 require_once 'HTML/QuickForm.php';
@@ -31,10 +31,9 @@
 $jumpto       = 'handle';
 
 $stripped = @array_map('strip_tags', $_POST);
-
 response_header('Request Account');
 
-print '<h1>Request Account</h1>';
+echo '<h1>Request Account</h1>';
 
 do {
     if (isset($stripped['submit'])) {
@@ -81,6 +80,12 @@
         //  The add method performs further validation then creates the account
         include_once 'pear-database-user.php';
         $ok = user::add($stripped);
+        if (PEAR::isError($ok)) {
+            $errors[] = 'This email address has already been registered by another user';
+            $display_form = true;
+            break;
+        }
+
 
         if (!empty($stripped['jumpto'])) {
             $jumpto = $stripped['jumpto'];
http://cvs.php.net/viewvc.cgi/pearweb/public_html/account-request-vote.php?r1=1.16&r2=1.17&diff_format=u
Index: pearweb/public_html/account-request-vote.php
diff -u pearweb/public_html/account-request-vote.php:1.16 pearweb/public_html/account-request-vote.php:1.17
--- pearweb/public_html/account-request-vote.php:1.16	Tue May  6 20:18:32 2008
+++ pearweb/public_html/account-request-vote.php	Thu May  8 18:15:40 2008
@@ -15,7 +15,7 @@
    +----------------------------------------------------------------------+
    | Authors:                                                             |
    +----------------------------------------------------------------------+
-   $Id: account-request-vote.php,v 1.16 2008/05/06 20:18:32 dufuz Exp $
+   $Id: account-request-vote.php,v 1.17 2008/05/08 18:15:40 dufuz Exp $
 */
 
 require_once 'HTML/QuickForm.php';
@@ -71,7 +71,7 @@
             $stripped['password2']);
 
         if (PEAR::isError($salt)) {
-            $errors[] = 'Database error (e.g. email address already registered).';
+            $errors[] = 'This email address has already been registered by another user';
             $display_form = true;
             break;
         }