Author Topic: Tag {user_id} in member_editprofile.html not working properly  (Read 4351 times)

0 Members and 1 Guest are viewing this topic.

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Tag {user_id} in member_editprofile.html not working properly
« on: November 11, 2007, 01:54:00 AM »
Hi guys,

I just realize today that the tag {user_id} in member_editprofile.html not working properly.
It return always the value: 1 (of admin).
I try it also on a fresh gallery (Without mod).
How can I make {user_id} showing the right ID value of the user on member_editprofile.html .

Actualy I want to use it with:
Code: [Select]
<a href="/member.php?action=showprofile&user_id={user_id}">My profile</a>
NOTE: The tag {user_id} is returning the right value in member_profile.html

Many thanks in advance, :)
Cruxy

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: Tag {user_id} in member_editprofile.html not working properly
« Reply #1 on: November 11, 2007, 01:57:48 AM »

Quote
<a href="/member.php?action=showprofile&user_id={user_id}">My profile</a>

for:

Code: [Select]
<a href="{url_member}?action=showprofile&user_id={user_id}">My profile</a>

The problem is not by {url_member}, but by {user_id} how is returning the wrong user_id value (always 1 of admin).

Please read good my request to understand what is the problem :wink:

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Tag {user_id} in member_editprofile.html not working properly
« Reply #2 on: November 11, 2007, 02:01:11 AM »
Quote
Please read good my request to understand what is the problem

With no URL, one block of code - how I can read request :?: :?
You post + 10 question today and you say to read good  :?8O
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: Tag {user_id} in member_editprofile.html not working properly
« Reply #3 on: November 11, 2007, 02:17:46 AM »
Ok then, I will explain: (Just forget about the other code)

On member_editprofile.html I have this line:
My user ID is: {user_id}.
Ther result is: My user ID is 1 (wrong, because I log in with user id 2)

I used the same line on member_profile.thml and the result was:
My user ID is 2 (GOOD).

So the problem is that the tag {user_id} is not returning the right user id value on the member_editprofile.html.

How can you solve this issue

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Tag {user_id} in member_editprofile.html not working properly
« Reply #4 on: November 11, 2007, 02:29:16 AM »
In includes/page_header.php file,

find:

Quote
"is_admin" => ($user_info['user_level'] == ADMIN) ? 1 : 0,

add after:

Code: [Select]
"current_user_id" => (isset($user_info[$user_table_fields['user_id']]) && !empty($user_info[$user_table_fields['user_id']])) ? (int)$user_info[$user_table_fields['user_id']] : "",

In member_profile.html file, use: {current_user_id} .
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: Tag {user_id} in member_editprofile.html not working properly
« Reply #5 on: November 11, 2007, 02:53:04 AM »
Perfect man :D