Updated application to use bool and int instead of boolean and integer. Also added an order by to the getSubscriptionCounties function

This commit is contained in:
2026-09-05 09:39:26 -04:00
parent 55081a11cf
commit 6401534c90
19 changed files with 39 additions and 35 deletions
+6 -6
View File
@@ -113,8 +113,8 @@ class Users extends Base {
$user_random_password = $this->generateRandomPassword();
$user_temp_password = password_hash($user_random_password, PASSWORD_DEFAULT);
$user_change_password = (boolean) true;
$user_active = (boolean) true;
$user_change_password = (bool) true;
$user_active = (bool) true;
// Add the User
@@ -204,7 +204,7 @@ class Users extends Base {
case "prompt":
$user_serial = (integer) filter_input(INPUT_POST, "user_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0;
$user_serial = (int) filter_input(INPUT_POST, "user_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0;
$user = $this->getUser($user_serial);
@@ -310,7 +310,7 @@ class Users extends Base {
$users = $this->getUserByUserId($user_id);
return ($users->count() === 0) ? 0 : (integer) $users->record->user_serial;
return ($users->count() === 0) ? 0 : (int) $users->record->user_serial;
}
// =====================
@@ -359,7 +359,7 @@ class Users extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC);
$count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0;
$count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination
@@ -517,7 +517,7 @@ class Users extends Base {
if (password_verify($user_password, $stored_hashed_password)) {
$_SESSION[self::USER_AUTHENTICATED] = true;
$_SESSION[self::USER_SERIAL] = (integer) $user->record->user_serial;
$_SESSION[self::USER_SERIAL] = (int) $user->record->user_serial;
$_SESSION[self::USER_ID] = (string) $user->record->user_id;
$_SESSION[self::USER_NAME] = (string) $user->record->user_name;
$_SESSION[self::USER_EMAIL] = (string) $user->record->user_email;