Skip to content

fix: Modify PHP to create User Table#37

Open
sergioceron wants to merge 1 commit intomasterfrom
coderops/fix-d4cb7713-task-2e8
Open

fix: Modify PHP to create User Table#37
sergioceron wants to merge 1 commit intomasterfrom
coderops/fix-d4cb7713-task-2e8

Conversation

@sergioceron
Copy link
Copy Markdown
Member

Automated fix by CoderOps.

Swarm: swarm50
Task: Modify PHP to create User Table

Copilot AI review requested due to automatic review settings April 10, 2026 18:28
Copy link
Copy Markdown

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 updates the admin users page (adminpanel_users.php) to adjust the rendered “users table” (user listing) and its columns.

Changes:

  • Reformats adminpanel_users.php and modifies the users listing table header.
  • Attempts to add additional user fields (e.g., “Correo”) to the listing output.
  • Introduces new table-row rendering content in the users loop.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread adminpanel_users.php
Comment on lines +119 to +126
<td><a href="javascript:void(0)"
onclick="go( 'adminpanel_edituser.php?user=<?=base64_encode($usuarios[$i]->usuario_id)?>' );return false">{{$usuarios[$i]->usuario_alias}}</a></td>
<td>{{getTipoUsuario($usuarios[$i]->usuario_tipo)}}</td>
<td>{{$usuarios[$i]->usuario_correo}}</td>
<td>{{$usuarios[$i]->usuario_telefono}}</td>
<td>{{$usuarios[$i]->usuario_direccion}}</td>
<td>{{count($userPonencias)}}</td>
<td>{{(trim($usuarios[$i]->usuario_ultimoacceso) != "" ? $usuarios[$i]->usuario_ultimoacceso : $_i18n["notavailable"])}}</td>
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

The row markup mixes Blade-style output tags ({{ ... }} / {{$...}}) inside a plain PHP template. In this codebase, user fields are rendered with PHP short echo tags (e.g., <?=$usuarios[$i]->usuario_alias?>). As written, the table will literally print the curly braces instead of the user data.

Copilot uses AI. Check for mistakes.
Comment thread adminpanel_users.php
Comment on lines +113 to +132
<tr class="" id="ARTICLE_COLLECTION_SELECTION_<?=$i?>">
<td></td>
<td><input value="true"
name="COLLECTION_SELECTION_<?=$i?>.<?=base64_encode($usuarios[$i]->usuario_id)?>"
onclick="cbTbl.selectOne(this); updateDeleteButtons(this);"
type="checkbox"></td>
<td><a href="javascript:void(0)"
onclick="go( 'adminpanel_edituser.php?user=<?=base64_encode($usuarios[$i]->usuario_id)?>' );return false">{{$usuarios[$i]->usuario_alias}}</a></td>
<td>{{getTipoUsuario($usuarios[$i]->usuario_tipo)}}</td>
<td>{{$usuarios[$i]->usuario_correo}}</td>
<td>{{$usuarios[$i]->usuario_telefono}}</td>
<td>{{$usuarios[$i]->usuario_direccion}}</td>
<td>{{count($userPonencias)}}</td>
<td>{{(trim($usuarios[$i]->usuario_ultimoacceso) != "" ? $usuarios[$i]->usuario_ultimoacceso : $_i18n["notavailable"])}}</td>
<td></td>
<td><input value="true"
name="COLLECTION_SELECTION_<?=$i?>.<?=base64_encode($usuarios[$i]->usuario_id)?>"
onclick="cbTbl.selectOne(this); updateDeleteButtons(this);"
type="checkbox"></td>
<td><a href="javascript:void(0)"
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

This <tr> currently contains two separate sets of cells/checkboxes (one using {{...}} and then the original <?=...?> version), plus extra columns (correo/telefono/direccion) that don't align with the header. This will break the table layout and likely the delete-selection logic (duplicate COLLECTION_SELECTION_... inputs per row). Remove the duplicated block and ensure each row outputs exactly one checkbox and the same number/order of <td> cells as the header.

Copilot uses AI. Check for mistakes.
Comment thread adminpanel_users.php
Comment on lines +100 to +109
<tr>
<th id="header"></th>
<th id="header" style="width: 3%"><input value="" name="select_all"
onclick="cbTbl.selectAll(this); updateDeleteButtons(this);"
type="checkbox"></th>
<th id="header" style="width: 30%"><?=$_i18n["name"]?></th>
<th id="header">Tipo</th>
<th id="header">Correo</th>
<th id="header"><?=$_i18n["lastaccess"]?></th>
</tr>
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

The column headers were changed to include "Correo", but the header no longer matches the data being rendered (the row still includes ponencias count and now also telefono/direccion). Update the <th> set to match the final columns you want to display, and ensure the bottom/upper colspan values remain consistent with the column count.

Copilot uses AI. Check for mistakes.
Comment thread adminpanel_users.php
Comment on lines +81 to +86
<?php
$usuarios = $db->get_results("select * from usuarios where usuario_tipo <> 1" );
?>
<form id="list" name="deleteItems"
action="adminpanel_process.php?sale=<?=base64_decode($values["cid"])?>"
method="post">
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

PR title/description indicate "create User Table", but this change only alters the admin users listing markup and does not create/modify any database table (e.g., schema in install/update.php). If the goal is schema creation, the PR needs to include the corresponding DDL/migration; otherwise, please update the PR description/title to reflect that this is a UI/table rendering change.

Copilot uses AI. Check for mistakes.
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