/** * Used to update the logged in user's information (name, contact). * * @param String $name * @param String $contact */ public function updateUserProfile($name, $contact) { $newInfo = json_encode(array('name' => $name, 'contact' => $contact)); $_SESSION['user']->setProfile($newInfo); $username = $_SESSION['user']->getUsername(); $this->dal->updateUser($username, $newInfo); }