No allow user to modify profile1 No allow user to modify profile1
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

No allow user to modify profile1

Started by wkpoon, June 08, 2007, 07:08:41 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wkpoon

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).

Sami

#1
Edit profile.php

- around line #36
find this:


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


change it to this


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


- Comment out line #189


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


- go to line #216 and change this


    $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


    $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
‍I don't answer to PM with support question
Please post your issue to related board

wkpoon

Thank you very much, it work any so far so good !!!!!