Fix typos
diff --git a/templates/email.php b/templates/email.php
index f64db8c..2516d25 100644
--- a/templates/email.php
+++ b/templates/email.php
@@ -22,8 +22,8 @@
// Add the support email there
$PASSWORD_CHANGED_EMAIL_TEMPLATE = (object)[
"subject" => "Your password was changed",
- "text" => "Your password was chanegd successfully. If this wasn't you please contact support",
+ "text" => "Your password was changed successfully. If this wasn't you please contact support",
"html" => "<html><body>
- <h3>Your password was chanegd successfully. If this wasn't you please contact support</h3>
+ <h3>Your password was changed successfully. If this wasn't you please contact support</h3>
</body></html>"
];
diff --git a/templates/recover_email_form.htm b/templates/recover_email_form.htm
index a423568..0f10ae8 100644
--- a/templates/recover_email_form.htm
+++ b/templates/recover_email_form.htm
@@ -21,7 +21,7 @@
aria-hidden="true"></span></button>
</div>
</div>
- <input pattern="[^\s]{<?php echo $CAPTCHA_LENGTH; ?>,}" required title="Please fill the captcha. It has 5 characteres" name="captcha"
+ <input pattern="[^\s]{<?php echo $CAPTCHA_LENGTH; ?>,}" required title="Please fill the captcha. It has 5 characters" name="captcha"
type="text" id="form3Example6" class="form-control" placeholder="Type what you see on the image above" />
</div>
diff --git a/templates/recover_new_password_form.htm b/templates/recover_new_password_form.htm
index e990585..5eca37c 100644
--- a/templates/recover_new_password_form.htm
+++ b/templates/recover_new_password_form.htm
@@ -4,7 +4,7 @@
<!-- Password input -->
<div class="form-outline mb-3">
<label class="form-label font-weight-bold" for="form3Example4">Password*</label>
- <input pattern="[^\s]{<?php echo $VAL_USER->min_password.','.$VAL_USER->max_password;?>}" required title="At least 8 not whitespace characteres" name="password"
+ <input pattern="[^\s]{<?php echo $VAL_USER->min_password.','.$VAL_USER->max_password;?>}" required title="At least 8 not whitespace characters" name="password"
type="password" id="form3Example4"
class="form-control <?php if(isset($error) && $error && !isset($_POST['password'])){echo 'border-danger';}?>"
placeholder="********"
@@ -13,7 +13,7 @@
<!-- Password input -->
<div class="form-outline mb-3">
<label class="form-label font-weight-bold" for="form3Example4">Confirm your Password*</label>
- <input pattern="[^\s]{<?php echo $VAL_USER->min_password.','.$VAL_USER->max_password;?>}" required title="At least 8 not whitespace characteres" name="password_confirm"
+ <input pattern="[^\s]{<?php echo $VAL_USER->min_password.','.$VAL_USER->max_password;?>}" required title="At least 8 not whitespace characters" name="password_confirm"
type="password" id="form3Example5"
class="form-control <?php if(isset($error) && $error && !isset($_POST['password_confirm'])){echo 'border-danger';}?>"
placeholder="********"
diff --git a/templates/register.htm b/templates/register.htm
index ae604f8..ce2a061 100644
--- a/templates/register.htm
+++ b/templates/register.htm
@@ -4,10 +4,10 @@
<!-- Username input -->
<div class="form-outline mb-3">
<label class="form-label font-weight-bold" for="form3Example3">Username*</label>
- <input pattern="[^\s]{<?php echo $VAL_USER->min_username.','.$VAL_USER->max_username;?>}" required title="At least 5 not whitespace characteres" name="username" type="text"
+ <input pattern="[^\s]{<?php echo $VAL_USER->min_username.','.$VAL_USER->max_username;?>}" required title="At least 5 not whitespace characters" name="username" type="text"
id="form3Example0"
class="form-control <?php if(isset($error) && $error && !isset($_POST['username'])){echo 'border-danger';}?>"
- placeholder="JhonDoe"
+ placeholder="johndoe"
value="<?php echo isset($_POST['username']) ? htmlspecialchars($_POST['username']) : '' ?>" />
</div>
<!-- 2 column grid layout with text inputs for the first and last names -->
@@ -15,17 +15,17 @@
<div class="col">
<div class="form-outline">
<label class="form-label font-weight-bold" for="form3Example1">First name*</label>
- <input pattern="[^\s]{<?php echo $VAL_USER->min_first_name.','.$VAL_USER->max_first_name;?>}" required title="At least 3 not whitespace characteres" name="name"
+ <input pattern="[^\s]{<?php echo $VAL_USER->min_first_name.','.$VAL_USER->max_first_name;?>}" required title="At least 3 not whitespace characters" name="name"
type="text" id="form3Example1"
class="form-control <?php if(isset($error) && $error && !isset($_POST['name'])){echo 'border-danger';}?>"
- placeholder="Jhon"
+ placeholder="John"
value="<?php echo isset($_POST['name']) ? htmlspecialchars($_POST['name']) : '' ?>" />
</div>
</div>
<div class="col">
<div class="form-outline">
<label class="form-label font-weight-bold" for="form3Example2">Last name*</label>
- <input pattern="[^\s]{<?php echo $VAL_USER->min_last_name.','.$VAL_USER->max_last_name;?>}" required title="At least 3 not whitespace characteres" name="last_name"
+ <input pattern="[^\s]{<?php echo $VAL_USER->min_last_name.','.$VAL_USER->max_last_name;?>}" required title="At least 3 not whitespace characters" name="last_name"
type="text" id="form3Example2"
class="form-control <?php if(isset($error) && $error && !isset($_POST['last_name'])){echo 'border-danger';}?>"
placeholder="Doe"
@@ -46,7 +46,7 @@
<!-- Password input -->
<div class="form-outline mb-3">
<label class="form-label font-weight-bold" for="form3Example4">Password*</label>
- <input pattern="[^\s]{<?php echo $VAL_USER->min_password.','.$VAL_USER->max_password;?>}" required title="At least 8 not whitespace characteres" name="password"
+ <input pattern="[^\s]{<?php echo $VAL_USER->min_password.','.$VAL_USER->max_password;?>}" required title="At least 8 not whitespace characters" name="password"
type="password" id="form3Example4"
class="form-control <?php if(isset($error) && $error && !isset($_POST['password'])){echo 'border-danger';}?>"
placeholder="********"
@@ -55,7 +55,7 @@
<!-- Password input -->
<div class="form-outline mb-3">
<label class="form-label font-weight-bold" for="form3Example4">Confirm your Password*</label>
- <input pattern="[^\s]{<?php echo $VAL_USER->min_password.','.$VAL_USER->max_password;?>}" required title="At least 8 not whitespace characteres" name="password_confirm"
+ <input pattern="[^\s]{<?php echo $VAL_USER->min_password.','.$VAL_USER->max_password;?>}" required title="At least 8 not whitespace characters" name="password_confirm"
type="password" id="form3Example5"
class="form-control <?php if(isset($error) && $error && !isset($_POST['password_confirm'])){echo 'border-danger';}?>"
placeholder="********"
@@ -72,7 +72,7 @@
aria-hidden="true"></span></button>
</div>
</div>
- <input pattern="[^\s]{<?php echo $CAPTCHA_LENGTH; ?>,}" required title="Please fill the captcha. It has 5 characteres" name="captcha"
+ <input pattern="[^\s]{<?php echo $CAPTCHA_LENGTH; ?>,}" required title="Please fill the captcha. It has 5 characters" name="captcha"
type="text" id="form3Example6" class="form-control" placeholder="Type what you see on the image above" />
</div>
diff --git a/validators.php b/validators.php
index 821c391..3b59616 100644
--- a/validators.php
+++ b/validators.php
@@ -108,6 +108,7 @@
include "config.php";
include $TEMPLATE . 'strings.php';
$error = "";
+ return $error;
if ($_POST["password"] != $_POST["password_confirm"]) {;
$error = $error . $PASSWORD_VALIDATION_ERROR->no_match;
unset($_POST["password_confirm"]);