Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: No allow user to modify profile1  (Read 2707 times)

0 Members and 1 Guest are viewing this topic.

wkpoon

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
No allow user to modify profile1
« on: June 08, 2007, 07:08:41 am »

I use the profile1 as user full name and enter by administrator, is there a way to prevent  user to modify their profile1 (user full name).
« Last Edit: June 08, 2007, 01:05:58 pm by Hein »
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: No allow user to modify profile1
« Reply #1 on: June 08, 2007, 10:17:18 am »

Edit profile.php

- around line #36
find this:

Code: [Select]
        array('input', 'user_profile1', $CONFIG['user_profile1_name'], 255),

change it to this

Code: [Select]
        array('text', 'user_profile1', $CONFIG['user_profile1_name']),

- Comment out line #189

Code: [Select]
//$profile1 = addslashes($_POST['user_profile1']);

- go to line #216 and change this

Code: [Select]
    $sql = "UPDATE {$CONFIG['TABLE_USERS']} SET " . "user_profile1 = '$profile1', " . "user_profile2 = '$profile2', " . "user_profile3 = '$profile3', " . "user_profile4 = '$profile4', " . "user_profile5 = '$profile5', " . "user_profile6 = '$profile6'" . ($CONFIG['allow_email_change'] && !$error ? ", user_email = '$email'" : "") . " WHERE user_id = '" . USER_ID . "'";

to this

Code: [Select]
    $sql = "UPDATE {$CONFIG['TABLE_USERS']} SET " . "user_profile2 = '$profile2', " . "user_profile3 = '$profile3', " . "user_profile4 = '$profile4', " . "user_profile5 = '$profile5', " . "user_profile6 = '$profile6'" . ($CONFIG['allow_email_change'] && !$error ? ", user_email = '$email'" : "") . " WHERE user_id = '" . USER_ID . "'";

I don't test it my self , report back if you got any issue
« Last Edit: June 08, 2007, 10:28:07 am by Sami »
Logged
‍I don't answer to PM with support question
Please post your issue to related board

wkpoon

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: No allow user to modify profile1
« Reply #2 on: June 08, 2007, 12:01:26 pm »

Thank you very much, it work any so far so good !!!!!
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.