--- legal.module.original	2009-10-21 13:42:36.000000000 -0400
+++ legal.module	2009-10-15 10:06:47.000000000 -0400
@@ -248,6 +248,22 @@ function legal_administration() {
         '#title' => t('Changes'),
     );
     
+    // URL Redirection
+    $form['redirection'] = array(
+		'#type' => 'fieldset',
+		'#title' => t( 'Url Redirection' ),
+		'#description' => t( 'Control how the Legal module redirects users after agreeing to the terms and conditions' ),
+		'#collapsible' => TRUE,
+		'#collapsed' => TRUE
+	);
+	
+	$form['redirection']['location'] = array(
+		'#type' => 'textfield',
+		'#title' => 'Redirect destination',
+		'#default_value' => variable_get( 'legal_destination', 'user' )
+	);	
+		
+    
     $form['#after_build'] = array('legal_preview');
     
     $form['preview'] = array(
@@ -326,6 +342,11 @@ function legal_administration_submit($fo
       drupal_set_message(t('Display setting has been saved.'));
   }
 
+	if( variable_get( 'legal_destination', 'user' ) != $form_state['values']['location'] ) {
+		variable_set( 'legal_destination', $form_state['values']['location'] );
+		drupal_set_message( t( 'Url Redirection has been saved: ' .  $form_state['values']['location'] ) );
+	}
+
   // If new conditions are different from current permisions - enter in database
   if ( legal_conditions_updated($form) ) {
       db_query("INSERT INTO {legal_conditions} (tc_id, conditions, date, extras, changes) VALUES (NULL, '%s', %d, '%s', '%s')", $values['conditions'], time(), serialize($values['extras']), $values['changes']);
@@ -626,7 +647,7 @@ function legal_login_submit($form, &$for
     cache_clear_all($user->uid, 'cache_menu', TRUE);
     
     user_module_invoke('login', $edit, $user);
-		$form_state['redirect'] = 'user/'. $user->uid; 
+	$form_state['redirect'] = variable_get( 'legal_destination', 'user' );
     return;
 }
 
