PHP8
[Pman.BAdmin] / Pman.Login.js
index c6c2842..77fb3b4 100644 (file)
@@ -51,7 +51,7 @@ Pman.Login =  new Roo.util.Observable({
         // check if we are logged in..
         new Pman.Request({  
             url: baseURL + '/Login',
-            method: 'GET',  
+            method: 'POST',  
             params: {
                 getAuthUser: true
             },  
@@ -75,6 +75,17 @@ Pman.Login =  new Roo.util.Observable({
                     
                 var _this = this;
                 if (!res.data.id) { // id=0 == login failure.
+                    
+                    if(window.location.pathname.substr(baseURL.length).match(/\/PasswordReset\//)){
+                        Pman.Dialog.BAdminPasswordReset.show({}, function(){
+                            window.location.href = baseURL;
+                        });
+                        
+                        return;
+                    }
+                     
+                    
+                    
                     return Pman.Dialog.Login.show(
                         {},
                         function(data) {
@@ -128,7 +139,7 @@ Pman.Login =  new Roo.util.Observable({
             params: {
                 getAuthUser: true
             },  
-            method: 'GET',  
+            method: 'POST',  
             success:  Pman.Login.success,
             failure : Pman.Login.failure,
             scope : Pman.Login
@@ -381,7 +392,7 @@ Pman.Login =  new Roo.util.Observable({
         
         new Pman.Request({  
             url: baseURL + '/Login',
-            method: 'GET',  
+            method: 'POST',  
             params: {
                 check_owner_company: true
             },