diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/settings.php | 20 | ||||
-rw-r--r-- | include/users-new.php | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/include/settings.php b/include/settings.php index bd4c0d0..23d6371 100644 --- a/include/settings.php +++ b/include/settings.php @@ -40,12 +40,12 @@ require('./header.php'); try { $user = new User($_pdo, $_GET['delete_user']); if ($user->delete()) { - echo "<div class='alert alert-success alert-dismissable'><button type='button' class='close fa fa-times' data-dismiss='alert' aria-hidden='true'></button>The user with username <i>{$user->getUsername()}</i> has been removed.</div>"; + echo "<div class='alert alert-success alert-dismissable'><button type='button' class='close fa fa-times' data-dismiss='alert' aria-hidden='true'></button>The user with username <i>{$user->username}</i> has been removed.</div>"; } else { - echo "<div class='alert alert-danger alert-dismissable'><button type='button' class='close fa fa-times' data-dismiss='alert' aria-hidden='true'></button>The user with username <i>{$user->getUsername()}</i> could not be removed.</div>"; + echo "<div class='alert alert-danger alert-dismissable'><button type='button' class='close fa fa-times' data-dismiss='alert' aria-hidden='true'></button>The user with username <i>{$user->username}</i> could not be removed.</div>"; } } catch (PDOException $e) { - echo "<div class='alert alert-danger alert-dismissable'><button type='button' class='close fa fa-times' data-dismiss='alert' aria-hidden='true'></button>The user with username <i>{$user->getUsername()}</i> could not be removed due to a PDO error.</div>"; + echo "<div class='alert alert-danger alert-dismissable'><button type='button' class='close fa fa-times' data-dismiss='alert' aria-hidden='true'></button>The user with username <i>{$user->username}</i> could not be removed due to a PDO error.</div>"; } catch (Exception $e) { echo "<div class='alert alert-danger alert-dismissable'><button type='button' class='close fa fa-times' data-dismiss='alert' aria-hidden='true'></button>The user with id {$_GET['delete_user']} could not be found.</div>"; } @@ -65,7 +65,7 @@ require('./header.php'); echo '<div class="alert alert-danger">The current password was incorrect.</div>'; } else { try { - $_user->setPassword($_POST['password_update']); + $_user->password = $_POST['password_update']; echo '<div class="alert alert-success">Password successfully changed.</div>'; } catch (PDOException $e) { echo '<div class="alert alert-danger">An unknown error occurred.</div>'; @@ -106,18 +106,18 @@ require('./header.php'); $users = BusinessAdmin::getUsers($_pdo); foreach ($users as $user) { echo "<tr class='mix' - data-mixer-order-id='{$user->getId()}' - data-mixer-order-username='{$user->getUsername()}'> - <td class='col-min-width'>{$user->getId()}</td> - <td class='col-max-width'>{$user->getUsername()}</td>"; + data-mixer-order-id='{$user->id}' + data-mixer-order-username='{$user->username}'> + <td class='col-min-width'>{$user->id}</td> + <td class='col-max-width'>{$user->username}</td>"; if ($_user->isAdmin()) { - if ($user->getId() == $_user->getId()) { + if ($user->id == $_user->id) { echo "<td class='col-min-width'> <a title='Change password' href='#' onclick='$(\"#password-current\").focus();' class='btn btn-warning btn-circle fa fa-key'></a> </td>"; } else { echo "<td class='col-min-width'> - <a title='Delete' href='?delete_user={$user->getId()}' class='btn btn-danger btn-circle fa fa-times'></a> + <a title='Delete' href='?delete_user={$user->id}' class='btn btn-danger btn-circle fa fa-times'></a> </td>"; } } diff --git a/include/users-new.php b/include/users-new.php index 5b4bd7f..0582134 100644 --- a/include/users-new.php +++ b/include/users-new.php @@ -33,7 +33,7 @@ try { $response->message = "The user could not be created due to an error."; } else { $response->success = true; - $response->message = "User <i>'{$user->getUsername()}'</i> has been created with password <code>$pass</code>. <a class='alert-link' href='javascript:location.reload(true);'>Refresh the page</a>."; + $response->message = "User <i>'{$user->username}'</i> has been created with password <code>$pass</code>. <a class='alert-link' href='javascript:location.reload(true);'>Refresh the page</a>."; } } catch (PDOException $e) { $response->success = false; |