Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

change username in v7.01.06

Asked Modified Viewed 2,303 times
S
skorpion31
S
  • Junior Member, joined since
  • Contributed 23 posts on the community forums.
  • Started 7 threads in the forums
  • Started this discussions
asked
Junior Member

Hi, how to prohibit users to change username in v7.01.06?
0 replies

8 posts

A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
answered
Veteran Member

Edit your edit_profile.php file and search for this Line :
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]echo "<td class='tbl'><input type='text' name='user_name' value='".$user_data['user_name']."' maxlength='30' class='textbox' style='width:200px;' /></td>\n";[/syntaxhighlighter]
Add a new Attribute to the INPUT Tag, i.e, readonly='readonly'
i.e, change it to :
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]echo "<td class='tbl'><input type='text' name='user_name' value='".$user_data['user_name']."' maxlength='30' class='textbox' style='width:200px;' readonly='readonly' /></td>\n";[/syntaxhighlighter]

Done !!!
0 replies
M
miskith
M
My projects:
PHP-Fusion Czech | miskith portfolio | theConnex (In preparation) | Online game (Future project)
  • Member, joined since
  • Contributed 117 posts on the community forums.
  • Started 2 threads in the forums
answered
Member

Quote

Ankur wrote:

Edit your edit_profile.php file and search for this Line :
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]echo "<td class='tbl'><input type='text' name='user_name' value='".$user_data['user_name']."' maxlength='30' class='textbox' style='width:200px;' /></td>\n";[/syntaxhighlighter]
Add a new Attribute to the INPUT Tag, i.e, readonly='readonly'
i.e, change it to :
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]echo "<td class='tbl'><input type='text' name='user_name' value='".$user_data['user_name']."' maxlength='30' class='textbox' style='width:200px;' readonly='readonly' /></td>\n";[/syntaxhighlighter]

Done !!!

It isn't 100% protection. It's better to completely remove the input.
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

However using the source you can still change the username readonly is useless.
0 replies
M
miskith
M
My projects:
PHP-Fusion Czech | miskith portfolio | theConnex (In preparation) | Online game (Future project)
  • Member, joined since
  • Contributed 117 posts on the community forums.
  • Started 2 threads in the forums
answered
Member

Quote

Craig wrote:

However using the source you can still change the username readonly is useless.

With editing HTML source or editing submited forms...
0 replies
A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
answered
Veteran Member

Aah ! I remember when I reported it to Fangree about editing Source... But I dont have the solution !

So I just posted this !!!

Anyone else, who have the solution to protect from Source, are welcome to post ! :)
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

Look in the 7.02 code it might help.
0 replies
P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

Easy solution:
Insert on the top of register.php
$_POST['user_name'] = $user_data['user_name'];


untested but you can try :)
0 replies
S
skorpion31
S
  • Junior Member, joined since
  • Contributed 23 posts on the community forums.
  • Started 7 threads in the forums
  • Started this discussions
answered
Junior Member

Quote

Ankur wrote:

Edit your edit_profile.php file and search for this Line :
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]echo "<td class='tbl'><input type='text' name='user_name' value='".$user_data['user_name']."' maxlength='30' class='textbox' style='width:200px;' /></td>\n";[/syntaxhighlighter]
Add a new Attribute to the INPUT Tag, i.e, readonly='readonly'
i.e, change it to :
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]echo "<td class='tbl'><input type='text' name='user_name' value='".$user_data['user_name']."' maxlength='30' class='textbox' style='width:200px;' readonly='readonly' /></td>\n";[/syntaxhighlighter]

Done !!!

Thanks that work for me PHP Fusion v7.01.06
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 8 posts
  • Votes 0 votes
  • Topic users 5 members

5 participants

C
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
S
S
  • Junior Member, joined since
  • Contributed 23 posts on the community forums.
  • Started 7 threads in the forums
  • Started this discussions
P
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
M
M
My projects:
PHP-Fusion Czech | miskith portfolio | theConnex (In preparation) | Online game (Future project)
  • Member, joined since
  • Contributed 117 posts on the community forums.
  • Started 2 threads in the forums
A
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet