diff --git a/__migrations.sql b/__migrations.sql new file mode 100644 index 0000000000000000000000000000000000000000..a3944bfa41a0822753dec15e0ecaaa9a392da366 --- /dev/null +++ b/__migrations.sql @@ -0,0 +1,2 @@ +-- 2 Apr, 2022 Migrations +ALTER TABLE `auth` ADD `sec_email` varchar(256) NULL; \ No newline at end of file diff --git a/libs/includes/User.class.php b/libs/includes/User.class.php index 16a9cd12f82fe17d877bec7eca3082f3e4e25300..65f7fa7291c2f9cb08c1cfcb4de474aa2edc941e 100644 --- a/libs/includes/User.class.php +++ b/libs/includes/User.class.php @@ -46,21 +46,27 @@ class User { $this->conn = Database::getConnection(); $this->conn->query(); + $this->username = $username; + + //TODO: Write the code to fetch user data from Database for the given username. If username is not present, throw Exception. + $this->id = null; //Update this from database. } public function authenticate() { } - public function setBio() + public function setBio($bio) { + //TODO: Write UPDATE command to change new bio } public function getBio() { + //TODO: Write SELECT command to get the bio. } - public function setAvatar() + public function setAvatar($link) { }