/** * Saves personal information about a user * @param User $user * @return void */ public function SavePersonalInfo(User $user) { # Prepare filter require_once 'text/bad-language-filter.class.php'; $language = new BadLanguageFilter(); $users = $this->GetSettings()->GetTable('User'); $s_sql = 'UPDATE ' . $users . ' SET ' . 'date_changed = ' . gmdate('U') . ', ' . "gender = " . ($user->GetGender() ? $this->SqlString($user->GetGender()) : "NULL") . ", " . "occupation = " . $this->SqlString($language->Filter($user->GetOccupation())) . ", " . "interests = " . $this->SqlHtmlString($language->Filter($user->GetInterests())) . ", " . "location = " . $this->SqlString($language->Filter($user->GetLocation())) . " " . 'WHERE user_id = ' . Sql::ProtectNumeric($user->GetId(), false); $this->Lock(array($users)); $this->GetDataConnection()->query($s_sql); $this->Unlock(); }