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

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

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 !!!!!