I am using the ne user manager in the cloud CHR to allow users to authenticate to multiple sites. The sites are connected to the could CHR via wire guard. Everything works fines. Now i am redesigning the login page so that I can have custom error messages. This was working with the v6.8 but with the latest v7.8 it is not working. I have checked the server return error messages for the v6.8 and designed the html accordingly but for the v7.8 the error message for no user or no user profile found both returns the error message as RADIUS server is not responding
I want to have 4 separate error messages
- Username or password incorrect (when either the username or password is incorrect)
- No user found (when the username is not found in the user-manager database)
- No valid user profile found (when the username is found but either no profile is assigned or the profile is expired)
- RADIUS server is not responding (when there is failed communication with the RADIUS server)
FYI, in the usermanger 6.8 i have edited the login.html with the following core to achieve it
Code: Select all
<p class="info $(if error)alert$(endif)">
$(if error)
<div style="color: #FF8080; text-align: center">
<script type="text/javascript">
var error = "$(error)";
if (error == "simultaneous session limit reached") {
document.write("Maximum simultaneous session limits reached<br><br>");
}
else if (error == "invalid password") {
document.write("Sorry Invalid Password.<br>Please enter your password carefully<br><br>");
}
else if (error == "no valid profile found") {
window.location= "404.html";
document.write("Your 1 month validity has expired.<br>Please contact reception to buy a new ticket<br><br>");
}
else if(error.search("not found") != -1) {
document.write("User Not Found.<br>Please contact reception with your ticket<br><br>");
}
else document.write("$(error)<br>")
</script>
</div>
$(endif)
</p>