include check to prevent adding username identical with static admin

in ConfigAccounts_p
pull/93/head
reger 8 years ago
parent 89017e17e4
commit a0705c049d

@ -23,6 +23,8 @@
<p class="error">Passwords do not match.</p>
::
<p class="error">Username too short. Username must be &gt;= 4 Characters.</p>
::
<p class="error">Username already used (not allowed).</p>
#(/error)#
#(passwordNotSetWarning)#::<div class="error">No password is set for the administration account. Please define a password for the admin account.</div>#(/passwordNotSetWarning)#

@ -185,7 +185,11 @@ public class ConfigAccounts_p {
prop.put("error", "2"); //PW does not match
return prop;
}
// do not allow same username as staticadmin
if (username.equalsIgnoreCase(sb.getConfig(SwitchboardConstants.ADMIN_ACCOUNT_USER_NAME,"admin"))) {
prop.put("error", "4");
return prop;
}
final String firstName = post.get("firstname");
final String lastName = post.get("lastname");
final String address = post.get("address");

@ -843,6 +843,9 @@
<trans-unit id="6ad966f5" xml:space="preserve" approved="no" translate="yes">
<source>Username too short. Username must be &amp;gt;= 4 Characters.</source>
</trans-unit>
<trans-unit id="1bf77769" xml:space="preserve" approved="no" translate="yes">
<source>Username already used (not allowed).</source>
</trans-unit>
<trans-unit id="e79780cf" xml:space="preserve" approved="no" translate="yes">
<source>No password is set for the administration account.</source>
</trans-unit>

Loading…
Cancel
Save