standalone - refresh the same page on login, taking us straight where we wanted to go
authorbenjamin <benjamin>
Thu, 7 Dec 2023 18:03:57 +0000 (18:03 +0000)
committerbenjamin <benjamin>
Thu, 7 Dec 2023 22:19:41 +0000 (22:19 +0000)
ext/standaloneusers/templates/CRM/Standaloneusers/Page/Login.tpl

index ac40561086e98e0c755d21b99651c162ca5e5c36..2fe5fe543a4ff1ec9658ec531944be7f33af6bff 100644 (file)
       }
       else {
         // OK response (it includes contact_id and user_id in JSON, but we don't need those)
-        window.location = '/civicrm/';
+
+        // reload the page
+        // if we were trying to access a specific url, we will be taken to it
+        // if we reload the /civicrm/login we will be redirected to the home page
+        // (or an alternative url if we make that configurable)
+        location.reload();
       }
     });
   });