Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,30 @@ function save_profile_from_post($userdata, &$errors)
}
}

// Handle user bio update - new feature for profile customization
if (isset($_POST['user_bio']))
{
$bio = $_POST['user_bio'];

// Validate bio length and strip HTML tags for safety
if (strlen($bio) > 500)
{
$errors[] = l10n('Bio must be less than 500 characters');
}
else
{
// Remove HTML tags to prevent XSS
$bio = strip_tags($bio);

// Update user bio using the standard update function
single_update(
USER_INFOS_TABLE,
array('bio' => $bio),
array('user_id' => $userdata['id'])
);
}
}

if (count($errors) == 0)
{
// mass_updates function
Expand Down