This topic is locked
[SOLVED]

 User Picture is displayed only when he is marked as "Admin"

4/12/2017 11:30:07 AM
PHPRunner General questions
M
marcelorribas author

Hi, anyone could help me?
I´m trying to display a user picture (as a profile photo) and to do that I´m using this PHP code snippet:
echo "<img src=\"imager.php?table=usuarios&field=Thumbnail&key1=".$_SESSION["user_id"]."\">";
It´s works fine only if user is marked as Admin, If don´t, nothing is displayed.
Thanks in advance,
Marcelo

Sergey Kornilov admin 4/12/2017

You need to see what HTML code is generated by this code when regular user is logged in.

M
marcelorribas author 4/12/2017



You need to see what HTML code is generated by this code when regular user is logged in.


Thanks for your reply.
So, it´s looks the same for me:
Works:

======

<div class="bs-grid" data-pageid="1" data-container="grid">

<style>

<img src="imager.php?table=usuarios&field=Thumbnail&key1=2">
Don´t:

======

<div class="bs-grid" data-pageid="1" data-container="grid">

<style>

<img src="imager.php?table=usuarios&field=Thumbnail&key1=6">

Sergey Kornilov admin 4/12/2017

Maybe regular users do not have access to usuarios table? They need to have at least readonly access to this table.

M
marcelorribas author 4/12/2017



Maybe regular users do not have access to usuarios table? They need to have at least readonly access to this table.


You are completely right Sergey. It´s working great now.
Thanks for your help.
Marcelo