fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [7115] setup: validate password


From: Sigurd Nes
Subject: [Fmsystem-commits] [7115] setup: validate password
Date: Mon, 14 Mar 2011 09:19:41 +0000

Revision: 7115
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7115
Author:   sigurdne
Date:     2011-03-14 09:19:40 +0000 (Mon, 14 Mar 2011)
Log Message:
-----------
setup: validate password

Modified Paths:
--------------
    trunk/setup/accounts.php

Modified: trunk/setup/accounts.php
===================================================================
--- trunk/setup/accounts.php    2011-03-11 23:42:09 UTC (rev 7114)
+++ trunk/setup/accounts.php    2011-03-14 09:19:40 UTC (rev 7115)
@@ -129,15 +129,22 @@
                phpgw::import_class('phpgwapi.globally_denied');
                $errors = array();
 
-               if ( $passwd == '' || $passwd2 == '' )
-               {
-                       $errors[] = lang('Password can not be empty');
-               }
-               
                if ( $passwd != $passwd2 )
                {
                        $errors[] = lang('Passwords did not match, please 
re-enter');
                }
+               else
+               {
+                       $account        = new phpgwapi_user();
+                       try
+                       {
+                               $account->validate_password($passwd);
+                       }
+                       catch(Exception $e)
+                       {
+                               $errors[] = $e->getMessage();
+                       }
+               }
 
                if ( !$username )
                {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]