Index: temp/test-xoops.ec-cube.net/html/register.php
===================================================================
--- temp/test-xoops.ec-cube.net/html/register.php	(revision 1070)
+++ temp/test-xoops.ec-cube.net/html/register.php	(revision 1086)
@@ -39,5 +39,5 @@
 }
 
-function userCheck($uname, $email, $pass, $vpass)
+function userCheck($uname, $email, $pass, $vpass, $agree_disc = "", $agree_check = false)
 {
     global $xoopsConfigUser;
@@ -113,4 +113,11 @@
         $stop .= sprintf(_US_PWDTOOSHORT,$xoopsConfigUser['minpass'])."<br />";
     }
+	
+	if ($agree_check) {
+		if($agree_disc != 1) {
+			$stop .= sprintf(_US_PWDTOOSHORT,$xoopsConfigUser['minpass'])."<br />";		
+		}
+	}
+		
     return $stop;
 }
@@ -124,6 +131,7 @@
 $user_viewemail = (isset($_POST['user_viewemail']) && intval($_POST['user_viewemail'])) ? 1 : 0;
 $user_mailok = (isset($_POST['user_mailok']) && intval($_POST['user_mailok'])) ? 1 : 0;
-$mailmaga = 1;
-$agree_disc = 1;
+$mailmaga = (isset($_POST['mailmaga']) && intval($_POST['mailmaga'])) ? 1 : 0;;
+$agree_disc = isset($_POST['agree_disc']) ? $myts->stripSlashesGPC($_POST['agree_disc']) : '';
+
 switch ( $op ) {
 case 'newuser':
@@ -139,5 +147,5 @@
     }
 
-    $stop .= userCheck($uname, $email, $pass, $vpass);
+    $stop .= userCheck($uname, $email, $pass, $vpass, $agree_disc, true);
     if (empty($stop)) {
 		$token =& XoopsSingleTokenHandler::quickCreate('register_finish');
