Index: /mods/wpsg_mod_kundenverwaltung.class.php
===================================================================
--- /mods/wpsg_mod_kundenverwaltung.class.php	(revision 5571)
+++ /mods/wpsg_mod_kundenverwaltung.class.php	(revision 5573)
@@ -137,5 +137,4 @@
 			$this->shop->update_option('wpsg_mod_kundenverwaltung_redirectLogout', $_REQUEST['wpsg_mod_kundenverwaltung_redirectLogout']);
 			$this->shop->update_option('wpsg_page_mod_kundenverwaltung_status', $_REQUEST['wpsg_page_mod_kundenverwaltung_status']);
-			$this->shop->update_option('wpsg_mod_kundenverwaltung_onlylogin', $_REQUEST['wpsg_mod_kundenverwaltung_onlylogin']);
 
 			$this->shop->update_option('wpsg_mod_kundenverwaltung_wpuser', $_REQUEST['wpsg_mod_kundenverwaltung_wpuser']);
@@ -233,5 +232,5 @@
 					$customer = array_shift(wpsg_customer::find(array('email' => $arCheckout['email'])));
 					
-					if (is_object($customer) && ($customer->wp_user_id != get_current_user_id() || !wpsg_isSizedInt(get_current_user_id())))
+					if (is_object($customer) && wpsg_isSizedInt($customer->wp_user_id) && ($customer->wp_user_id != get_current_user_id() || !wpsg_isSizedInt(get_current_user_id())))
 					{
 						
@@ -323,4 +322,19 @@
 					
 						$kunde_id = $this->db->fetchOne("SELECT K.`id` FROM `".WPSG_TBL_KU."` AS K WHERE K.`email` = '".wpsg_q($arCheckout['email'])."'");
+						
+						// Die KundenID der TemporÃ€ren Bestellung muss hier ausgeschlossen werden, da man sonst nicht weiterkommt
+						$temp_customer_id = $this->db->fetchOne("SELECT `k_id` FROM `".WPSG_TBL_ORDER."` WHERE `id` = '".wpsg_q($_SESSION['wpsg']['order_id'])."' ");
+						
+						$strQuery = "
+							SELECT 
+								K.`id` 
+							FROM 
+								`".WPSG_TBL_KU."` AS K 
+							WHERE 
+								K.`email` = '".wpsg_q($arCheckout['email'])."' AND
+								K.`id` != '".wpsg_q($temp_customer_id)."'  
+						";
+					 
+						$kunde_id = $this->db->fetchOne($strQuery);
 						
 						if ($kunde_id > 0)
@@ -568,13 +582,19 @@
 				{
 				
-					if (wpsg_isSizedInt($this->shop->get_option('wpsg_mod_kundenverwaltung_redirectlogin')) && $this->shop->get_option('wpsg_mod_kundenverwaltung_redirectlogin') == '1' && wpsg_isSizedString($_REQUEST['wpsg_referer']))
-					{
-
+					if (wpsg_isSizedInt($this->shop->get_option('wpsg_mod_kundenverwaltung_redirectlogin')))
+					{
+						
+						$this->shop->redirect(get_permalink($this->shop->get_option('wpsg_mod_kundenverwaltung_redirectlogin')));
+						
+					} 
+					else if (wpsg_isSizedString($_REQUEST['wpsg_referer']))
+					{
+						
 						$this->shop->redirect($_REQUEST['wpsg_referer']);
 						
-					}
-					else
-					{
-					
+					} 
+					else 
+					{
+						
 						$this->shop->redirect($this->shop->getURL(wpsg_ShopController::URL_PROFIL));
 						
@@ -864,7 +884,13 @@
 				$this->logout();
 				
-				if (wpsg_isSizedInt($this->shop->get_option('wpsg_mod_kundenverwaltung_redirectLogout')) && $this->shop->get_option('wpsg_mod_kundenverwaltung_redirectLogout') == '1' && wpsg_isSizedString($_REQUEST['wpsg_referer']))
-				{
-
+				if (wpsg_isSizedInt($this->shop->get_option('wpsg_mod_kundenverwaltung_redirectLogout')))
+				{
+					
+					$this->shop->redirect(get_permalink($this->shop->get_option('wpsg_mod_kundenverwaltung_redirectLogout')));
+					
+				}
+				else if (wpsg_isSizedString($_REQUEST['wpsg_referer']))
+				{
+					
 					$this->shop->redirect($_REQUEST['wpsg_referer']);
 					
@@ -872,5 +898,5 @@
 				else
 				{
-				
+					
 					$this->shop->redirect($this->getProfilURL());
 					
Index: /views/mods/mod_kundenverwaltung/settings_edit.phtml
===================================================================
--- /views/mods/mod_kundenverwaltung/settings_edit.phtml	(revision 5571)
+++ /views/mods/mod_kundenverwaltung/settings_edit.phtml	(revision 5573)
@@ -13,12 +13,12 @@
 <?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_preisAnzeige', __('Bestellung nur fÃŒr eingeloggte Benutzer', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige'), array('help' => 'wpsg_mod_kundenverwaltung_preisAnzeige')); ?>
 
-<?php echo wpsg_drawForm_Select('wpsg_mod_kundenverwaltung_redirectlogin', __('Weiterleitung nach Login', 'wpsg'), array(
-	'0' => __('Auf Profilseite leiten', 'wpsg'),
-	'1' => __('Auf aktueller Seite bleiben', 'wpsg')		
-), $this->get_option('wpsg_mod_kundenverwaltung_redirectlogin'), array('help' => 'wpsg_mod_kundenverwaltung_redirectlogin')); ?>
-<?php echo wpsg_drawForm_Select('wpsg_mod_kundenverwaltung_redirectLogout', __('Weiterleitung nach Logout', 'wpsg'), array(
-	'0' => __('Auf Profilseite leiten', 'wpsg'),
-	'1' => __('Auf aktueller Seite bleiben', 'wpsg')		
-), $this->get_option('wpsg_mod_kundenverwaltung_redirectLogout'), array('help' => 'wpsg_mod_kundenverwaltung_redirectLogout')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_kundenverwaltung_redirectlogin', __('Weiterleitung nach Login', 'wpsg'), wpsg_array_merge(array(	
+	'0' => __('Auf aktueller Seite bleiben', 'wpsg')		
+), $arPageWithoutCreate), $this->get_option('wpsg_mod_kundenverwaltung_redirectlogin'), array('help' => 'wpsg_mod_kundenverwaltung_redirectlogin')); ?>
+
+<?php echo wpsg_drawForm_Select('wpsg_mod_kundenverwaltung_redirectLogout', __('Weiterleitung nach Logout', 'wpsg'), wpsg_array_merge(array(	
+	'0' => __('Auf aktueller Seite bleiben', 'wpsg')		
+), $arPageWithoutCreate), $this->get_option('wpsg_mod_kundenverwaltung_redirectLogout'), array('help' => 'wpsg_mod_kundenverwaltung_redirectLogout')); ?>
+
 <?php echo wpsg_drawForm_Select('wpsg_page_mod_kundenverwaltung_status', __('Status nach Registrierung', 'wpsg'), array('inaktiv', 'aktiv'), $this->get_option('wpsg_page_mod_kundenverwaltung_status'), array('help' => 'wpsg_mod_kundenverwaltung_status')); ?>
 <div class="wpsg_form_field">
@@ -38,5 +38,4 @@
 <?php echo wpsg_drawForm_Select('wpsg_page_mod_kundenverwaltung_weiterleitung_nach_registrierung', __('Weiterleitung nach Registrierung', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_kundenverwaltung_weiterleitung_nach_registrierung'), array('help' => 'wpsg_page_mod_kundenverwaltung_weiterleitung_nach_registrierung')); ?>
 <?php echo wpsg_drawForm_Select('wpsg_page_mod_kundenverwaltung_order', __('BestellÃŒbersichtsseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_kundenverwaltung_order'), array('help' => 'wpsg_mod_kundenverwaltung_order')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_onlylogin', __('Bestellungen nur fÃŒr registrierte Kunden zulassen', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_onlylogin'), array('help' => 'wpsg_mod_kundenverwaltung_onlylogin')); ?>
 <br />
 
