[vhffs-dev] [2204] user hashed passwords and mail hashed passwords are now using the same hash algorithm , don' t ask anymore the user password when creating the user mailbox and just copy the hash

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 2204
Author:   gradator
Date:     2012-07-15 19:15:07 +0200 (Sun, 15 Jul 2012)
Log Message:
-----------
user hashed passwords and mail hashed passwords are now using the same hash algorithm, don't ask anymore the user password when creating the user mailbox and just copy the hash

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Panel/User.pm

Modified: trunk/vhffs-api/src/Vhffs/Panel/User.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/User.pm	2012-07-15 16:08:43 UTC (rev 2203)
+++ trunk/vhffs-api/src/Vhffs/Panel/User.pm	2012-07-15 17:15:07 UTC (rev 2204)
@@ -360,19 +360,15 @@
 								my $box = $mu->get_box;
 								unless( $box ) {
 									# Box doesn't exists, need a password
-									unless( $pwd_change ) {
-										$panel->add_error( gettext('Error ! You MUST provide a password in your account when you create your popable account') );
-									} else  {
-										unless( $box = $mu->add_box($pass1) ) {
-											$panel->add_error( gettext('An error occured while adding the box') );
+									unless( $box = $mu->add_box( $userp->get_password, 1 ) ) {
+										$panel->add_error( gettext('An error occured while adding the box') );
+									} else {
+										$box->get_localpart->set_nospam( $nospam );
+										$box->get_localpart->set_novirus( $novirus );
+										unless( $box->get_localpart->commit ) {
+											$panel->add_error( gettext('An error occured while adding the box (anti-spam or anti-virus adding)') );
 										} else {
-											$box->get_localpart->set_nospam( $nospam );
-											$box->get_localpart->set_novirus( $novirus );
-											unless( $box->get_localpart->commit ) {
-												$panel->add_error( gettext('An error occured while adding the box (anti-spam or anti-virus adding)') );
-											} else {
-												$panel->add_info( gettext('Mailbox successfully added') );
-											}
+											$panel->add_info( gettext('Mailbox successfully added') );
 										}
 									}
 								} else {


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/