Whitespace cleanup
This commit is contained in:
parent
79d9f45c38
commit
c1ba468807
@ -3,7 +3,7 @@ class User extends Entity {
|
||||
private $id = 0;
|
||||
private $name = '';
|
||||
private $notes = '';
|
||||
|
||||
|
||||
public static function create_user($name) {
|
||||
$ins_user = prepare('insert into `user`(`name`) values (?)');
|
||||
bind($ins_user, 's', $name);
|
||||
@ -34,7 +34,7 @@ class User extends Entity {
|
||||
$this->id = $id;
|
||||
$this->update_fields();
|
||||
}
|
||||
|
||||
|
||||
private function update_fields() {
|
||||
$get = prepare('select * from `user` where `id`=?');
|
||||
bind($get, 'i', $this->id);
|
||||
@ -125,11 +125,11 @@ class User extends Entity {
|
||||
public function get_id() {
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
|
||||
public function get_name() {
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
|
||||
public function set_name($newname) {
|
||||
$update = prepare('update `user` set `name`=? where `id`=?');
|
||||
bind($update, 'si', $newname, $this->id);
|
||||
@ -141,7 +141,7 @@ class User extends Entity {
|
||||
public function get_notes() {
|
||||
return $this->notes;
|
||||
}
|
||||
|
||||
|
||||
public function set_notes($newnotes) {
|
||||
$update = prepare('update `user` set `notes`=? where `id`=?');
|
||||
bind($update, 'si', $newnotes, $this->id);
|
||||
@ -151,7 +151,7 @@ class User extends Entity {
|
||||
}
|
||||
|
||||
public function get_loans($type = 'both') {
|
||||
$statement = "select `id` from `event`
|
||||
$statement = "select `id` from `event`
|
||||
left join `loan` on `event`.`id` = `loan`.`event`
|
||||
where
|
||||
`type`='loan' and `user`=?";
|
||||
|
Loading…
x
Reference in New Issue
Block a user