Browse Source

Update authentication.php

Make the database the default authentication plugin if the default setting -> authentication is not set.
FusionPBX 9 years ago
parent
commit
f9e3c507d2
1 changed files with 5 additions and 0 deletions
  1. 5 0
      core/authentication/resources/classes/authentication.php

+ 5 - 0
core/authentication/resources/classes/authentication.php

@@ -53,6 +53,11 @@ class authentication {
 				$this->get_domain();
 			}
 
+		//set the database as the default plugin
+			if (!isset($_SESSION['authentication']['methods'])) {
+				$_SESSION['authentication']['methods'][] = 'database';
+			}
+
 		//use the authentication plugins
 			foreach ($_SESSION['authentication']['methods'] as $name) {
 				$class_name = "plugin_".$name;