Index: admin/auth.php
===================================================================
--- admin/auth.php	(revision 27)
+++ admin/auth.php	(revision 36)
@@ -32,4 +32,5 @@
 $login_data = !empty($_POST['login_data']) ? $_POST['login_data'] : null;
 $recover = $core->auth->allowPassChange() && !empty($_REQUEST['recover']);
+$safe_mode = !empty($_REQUEST['safe_mode']);
 $akey = $core->auth->allowPassChange() && !empty($_GET['akey']) ? $_GET['akey'] : null;
 $user_id = $user_pwd = $user_key = $user_email = null;
@@ -205,4 +206,8 @@
 		}
 	}
+	elseif ($check_user && !empty($_POST['safe_mode']) && !$core->auth->isSuperAdmin()) 
+	{
+		$err = __('Safe Mode can only be used for super administrators.');
+	}
 	elseif ($check_user)
 	{
@@ -213,4 +218,8 @@
 		if (!empty($_POST['blog'])) {
 			$_SESSION['sess_blog_id'] = $_POST['blog'];
+		}
+		
+		if (!empty($_POST['safe_mode']) && $core->auth->isSuperAdmin()) {
+			$_SESSION['sess_safe_mode'] = true;
 		}
 		
@@ -284,4 +293,8 @@
 	 return true;
     };
+    
+    $('a#safe_mode_link_help').click(function() {
+      $(this).parent().next().slideToggle();
+    });
   });
   //]]>
@@ -310,9 +323,9 @@
 	echo
 	'<fieldset><legend>'.__('Request a new password').'</legend>'.
-	'<p><label for="user_id">'.__('Username:').' '.
-	form::field(array('user_id','user_id'),20,32,html::escapeHTML($user_id),'',1).'</label></p>'.
-	
-	'<p><label for="user_email">'.__('Email:').' '.
-	form::field(array('user_email','user_email'),20,255,html::escapeHTML($user_email),'',2).'</label></p>'.
+	'<p><label>'.__('Username:').' '.
+	form::field(array('user_id'),20,32,html::escapeHTML($user_id),'',1).'</label></p>'.
+	
+	'<p><label>'.__('Email:').' '.
+	form::field(array('user_email'),20,255,html::escapeHTML($user_email),'',2).'</label></p>'.
 	
 	'<p><input type="submit" value="'.__('recover').'" tabindex="3" />'.
@@ -326,9 +339,9 @@
 	echo
 	'<fieldset><legend>'.__('Change your password').'</legend>'.
-	'<p><label for="new_pwd">'.__('New password:').' '.
-	form::password(array('new_pwd','new_pwd'),20,255,'','',1).'</label></p>'.
-	
-	'<p><label for="new_pwd_c">'.__('Confirm password:').' '.
-	form::password(array('new_pwd_c','new_pwd_c'),20,255,'','',2).'</label></p>'.
+	'<p><label>'.__('New password:').' '.
+	form::password(array('new_pwd'),20,255,'','',1).'</label></p>'.
+	
+	'<p><label>'.__('Confirm password:').' '.
+	form::password(array('new_pwd_c'),20,255,'','',2).'</label></p>'.
 	'</fielset>'.
 	
@@ -346,21 +359,26 @@
 		echo
 		'<fieldset>';
+		if ($safe_mode) {
+			echo '<legend>'.__('Safe mode login').'</legend>';
+		}
 		echo
-		'<p><label for="user_id">'.__('Username:').' '.
-		form::field(array('user_id','user_id'),20,32,html::escapeHTML($user_id),'',1).'</label></p>'.
-		
-		'<p><label for="user_pwd">'.__('Password:').' '.
-		form::password(array('user_pwd','user_pwd'),20,255,'','',2).'</label></p>'.
+		'<p><label>'.__('Username:').' '.
+		form::field(array('user_id'),20,32,html::escapeHTML($user_id),'',1).'</label></p>'.
+		
+		'<p><label>'.__('Password:').' '.
+		form::password(array('user_pwd'),20,255,'','',2).'</label></p>'.
 		
 		'<p><label class="classic">'.
-		'<p><label for="user_remember" class="classic">'.
-		form::checkbox(array('user_remember','user_remember'),1,'','',3).' '.
+		form::checkbox(array('user_remember'),1,'','',3).' '.
 		__('Remember my ID on this computer').'</label></p>'.
 		
-		'<p><input type="submit" value="'.__('log in').'" tabindex="4" /></p>';
+		'<p><input type="submit" value="'.__('login').'" tabindex="4" /></p>';
 		
 		if (!empty($_REQUEST['blog'])) {
 			echo form::hidden('blog',html::escapeHTML($_REQUEST['blog']));
 		}
+		if($safe_mode) {
+			echo form::hidden('safe_mode',1);
+		}
 		
 		echo
@@ -368,4 +386,17 @@
 		
 		'<p>'.__('You must accept cookies in order to use the private area.').'</p>';
+		
+		if ($safe_mode) {
+			echo
+			'<p><a href="auth.php" id="normal_mode_link">'.__('Get back to normal authentication').'</a></p>';
+		} else {
+			echo
+			'<p><a href="auth.php?safe_mode=1" id="safe_mode_link">'.__('I want to log in in safe mode').'</a></p>'.
+			'<p class="form-note"><a href="#" id="safe_mode_link_help">'.__('Know more about safe mode').'</a></p>'.
+			'<p id="safe_mode_help"><em>'.
+				__('This mode allows you to log in without any plugin loaded (very usefull in case of conflict between two of them for example)').'&nbsp;'.
+				__('Disable or delete plugin(s) which are giving you troubles then log out. You can after log in as usual').
+			'</em></p>';
+		}
 		
 		if ($core->auth->allowPassChange()) {
