Skip to content

Conversation

@GregMage
Copy link
Contributor

@GregMage GregMage commented Sep 4, 2025

(Fix:#1561)

@mambax7 mambax7 requested a review from Copilot September 4, 2025 16:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves the user interface by conditionally displaying user profile fields only when they contain data, preventing empty fields from appearing in the user information display.

  • Wraps user profile field assignments in conditional checks to prevent empty values from being displayed
  • Removes unnecessary empty string assignment for website URL when the field is empty
  • Adds consistent conditional logic across all optional profile fields (name, website, ICQ, AIM, YIM, MSN, location, occupation, interests, bio, signature)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +136 to +138
if ($thisUser->getVar('user_intrest') != '') {
$xoopsTpl->assign('lang_interest', _US_INTEREST);
$xoopsTpl->assign('user_interest', $thisUser->getVar('user_intrest'));
Copy link

Copilot AI Sep 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a spelling inconsistency: the database field is 'user_intrest' but the template variable is 'user_interest'. The field name should likely be 'user_interest' to match the correct spelling.

Suggested change
if ($thisUser->getVar('user_intrest') != '') {
$xoopsTpl->assign('lang_interest', _US_INTEREST);
$xoopsTpl->assign('user_interest', $thisUser->getVar('user_intrest'));
if ($thisUser->getVar('user_interest') != '') {
$xoopsTpl->assign('lang_interest', _US_INTEREST);
$xoopsTpl->assign('user_interest', $thisUser->getVar('user_interest'));

Copilot uses AI. Check for mistakes.
@mambax7 mambax7 merged commit 06d2798 into XOOPS:master Sep 7, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants