[vhffs-dev] [813] Deleted useless default configuration about users

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


Revision: 813
Author:   gradator
Date:     2007-08-30 01:02:36 +0000 (Thu, 30 Aug 2007)

Log Message:
-----------
Deleted useless default configuration about users

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/User.pm
    trunk/vhffs-backend/conf/vhffs.conf.dist.in
    trunk/vhffs-panel/subscribe.pl
    trunk/vhffs-tests/conf/vhffs.conf


Modified: trunk/vhffs-api/src/Vhffs/User.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/User.pm	2007-08-30 00:48:03 UTC (rev 812)
+++ trunk/vhffs-api/src/Vhffs/User.pm	2007-08-30 01:02:36 UTC (rev 813)
@@ -210,14 +210,6 @@
         # Insert base information
         $admin = 0 unless (defined $admin);
         my $homedir = Vhffs::Functions::hash_homename( $username  , $main );
-        $firstname = $userconf->{'default_firstname'} unless ( defined $firstname );
-        $lastname = $userconf->{'default_lastname'} unless ( defined $lastname );
-        $address = $userconf->{'default_address'} unless ( defined $address );
-        $zipcode = $userconf->{'default_zipcode'} unless ( defined $zipcode );
-        $city = $userconf->{'default_city'} unless ( defined $city );
-        $mail = $userconf->{'default_mail'} unless ( defined $mail );
-        $gpg_key = "" unless ( defined $gpg_key && $gpg_key ne "" );
-        $country = $userconf->{'default_country'} unless ( defined $country );
 
         my $sth = $dbh->prepare('INSERT INTO vhffs_users (uid, gid, username, shell, passwd, homedir, admin, firstname, lastname, address, zipcode, city, country, mail, gpg_key, note, language, theme, object_id) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 0, ?, NULL, ?)');
         $sth->execute($uid, $gid, $username, $userconf->{'default_shell'}, Vhffs::Functions::password_encrypt($password), $homedir, $admin, $firstname, $lastname, $address, $zipcode, $city, $country, $mail, $gpg_key, Vhffs::Constants::DEFAULT_LANG, $parent->get_oid);
@@ -283,16 +275,6 @@
     $self->{'status'} = 'I' if ( ! defined $self->{'status'} );
     $self->{'admin'} = 0 if ( ! defined $self->{'admin'} );
 	return -1 if ( ( ! defined $self->{'passwd'} ) || ( $self->{'passwd'} eq "" ) );
-
-
-    $self->{'firstname'} = $self->{'main'}->get_config->get_users->{'default_firstname'} if ( !defined $self->{'firstname'} );
-    $self->{'lastname'} = $self->{'main'}->get_config->get_users->{'default_lastname'} if ( !defined $self->{'lastname'} );
-    $self->{'address'} = $self->{'main'}->get_config->get_users->{'default_address'} if ( !defined $self->{'address'} );
-    $self->{'zipcode'} = $self->{'main'}->get_config->get_users->{'default_zipcode'} if ( !defined $self->{'zipcode'} );
-    $self->{'city'} = $self->{'main'}->get_config->get_users->{'default_city'} if ( !defined $self->{'city'} );
-    $self->{'mail'} = $self->{'main'}->get_config->get_users->{'default_mail'} if ( !defined $self->{'mail'} );
-    $self->{'gpg_key'} = " " if( ( ! defined $self->{'gpg_key'} ) || ( $self->{'gpg_key'} eq "" ) );
-    $self->{'country'} = $self->{'main'}->get_config->get_users->{'default_country'} if ( !defined $self->{'country'} );
     
     return -1 if( $self->SUPER::commit < 0 );
     

Modified: trunk/vhffs-backend/conf/vhffs.conf.dist.in
===================================================================
--- trunk/vhffs-backend/conf/vhffs.conf.dist.in	2007-08-30 00:48:03 UTC (rev 812)
+++ trunk/vhffs-backend/conf/vhffs.conf.dist.in	2007-08-30 01:02:36 UTC (rev 813)
@@ -158,15 +158,8 @@
 	minuid			=	@MINUID@
 	mingid			=	@MINGID@
 	default_quota		=	50
-	bad_username_file	=	@CONFDIR@/badfile
-	bad_groupname_file	=	@CONFDIR@/badgroup
-	default_firstname	=	Vhffs Firstname
-	default_lastname	=	Vhffs Lastname
-	default_address		=	Vhffs Address
-	default_city		=	Vhffs City
-	default_zipcode		=	123456
-	default_mail		=	dave@xxxxxxxx
-	default_country		=	Disneyland
+	bad_username_file	=	@CONFDIR@/bl_username
+	bad_groupname_file	=	@CONFDIR@/bl_groupname
 	available_shells	=	/bin/bash /bin/tcsh /bin/zsh /bin/tuxshell
 	default_shell		=	/bin/bash
 

Modified: trunk/vhffs-panel/subscribe.pl
===================================================================
--- trunk/vhffs-panel/subscribe.pl	2007-08-30 00:48:03 UTC (rev 812)
+++ trunk/vhffs-panel/subscribe.pl	2007-08-30 01:02:36 UTC (rev 813)
@@ -163,7 +163,7 @@
 	{
 	    my $retour;
         my $user = Vhffs::User::create( $vhffs, $username, &Vhffs::Functions::generate_random_password(), 
-            0, $mail, $firstname, $lastname, $city, $zipcode, $country, $address); 
+            0, $mail, $firstname, $lastname, $city, $zipcode, $country, $address, "");
 		
 		if(! defined $user )
 		{

Modified: trunk/vhffs-tests/conf/vhffs.conf
===================================================================
--- trunk/vhffs-tests/conf/vhffs.conf	2007-08-30 00:48:03 UTC (rev 812)
+++ trunk/vhffs-tests/conf/vhffs.conf	2007-08-30 01:02:36 UTC (rev 813)
@@ -137,13 +137,6 @@
 	default_quota	=	50
 	bad_username_file =	/etc/vhffs/badfile
 	bad_groupname_file	=	/etc/vhffs/badgroup
-	default_firstname = Vhffs Firstname
-	default_lastname = Vhffs Lastname
-	default_address = Vhffs Address
-	default_city = Vhffs City
-	default_zipcode = 123456
-	default_mail = dave@xxxxxxxx
-	default_country = Disneyland
 </users>
 
 


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