Starting page for members - do not redirect to invoices
Hello,
I understand the designed behavior for login is to consider if the member has any open invoices and, if so, redirect to /Sys/Profile/Finances (as documented at https://gethelp.wildapricot.com/en/articles/190 ).
This approach to onboarding new members goes against the spirit of our organization. To explain, our members are school district employees - often several people from the same district - and tend to be consistent year-to-year. Their fees are paid by their employers (by check) once we send them an invoice, but in the mean-time, they should be permitted to freely browse the members-only portion of the website without the redirect.
Would you consider some sort of "Override redirect to Finances on login" option as part of the "Starting Page" configuration?
In the mean-time, I have found a solution. If the querystring parameter of "ReturnUrl=" is provided on /Sys/Login, the redirect to Finances will not occur.
So, I manipulate the login link with javascript like the following:
var loginLinks = document.getElementsByClassName("loginLink");
for(var i=0;i<loginLinks.length;i++){
if(typeof loginLinks[i] === "object" && loginLinks[i].tagName === "A" && !loginLinks[i].search.match(/returnurl=/i)){
var u = new URL(loginLinks[i].href);
u.search += (u.search.indexOf("?") !== 0 ? "?":"&") + "ReturnUrl=%2f";
loginLinks[i].href = u.href;
}
}