Changeset 1985


Ignore:
Timestamp:
Apr 27, 2007, 7:22:17 AM (18 years ago)
Author:
rub
Message:

Issue 0000682: Error on user registration
On register page when the 2 passwords are not the same, an error occurs but user is also created.

=> Just error must be raised.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_user.inc.php

    r1933 r1985  
    4545}
    4646
    47 function register_user($login, $password, $mail_address)
     47function register_user($login, $password, $mail_address, $errors = array())
    4848{
    4949  global $lang, $conf;
    5050
    51   $errors = array();
    5251  if ($login == '')
    5352  {
  • trunk/register.php

    r1908 r1985  
    55// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    7 // | branch        : BSF (Best So Far)
    87// | file          : $Id$
    98// | last update   : $Date$
     
    5150
    5251  $errors =
    53     array_merge(
    54       $errors,
    5552      register_user($_POST['login'],
    5653                    $_POST['password'],
    57                     $_POST['mail_address'])
    58       );
     54                    $_POST['mail_address'],
     55                    $errors);
    5956
    6057  if (count($errors) == 0)
Note: See TracChangeset for help on using the changeset viewer.