Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev > Mods & Themes
Reply
  #1  
Old 9th April 2012, 17:05
HUnter83's Avatar
HUnter83 HUnter83 is offline
Senior Member
 
Join Date: Aug 2010
United Kingdom
Posts: 46
Smile Allow Staff to Change a User Name
open file admin.php and add

Code:
'changename'    => 'changename',
open file admin\index.php and add

Code:
<span class='btn'><a href='admin.php?action=changename'>{$lang['index_changen']}</a></span>
open file lang\en\lang_ad_index.php and add

Code:
'index_changen' => 'Change Users Name',
upload the attached files changename.php to admin folder and lang_ad_changen.php to lang\en folder
Attached Files
File Type: php changename.php (4.1 KB, 39 views)
File Type: php lang_ad_changen.php (587 Bytes, 18 views)
Reply With Quote
  #2  
Old 20th June 2012, 08:21
vendola's Avatar
vendola vendola is offline
Member
 
Join Date: Apr 2012
P2P
Posts: 3
Default For me This is Unfinished mod and unsecure mod!
And in feture will be more respectefull to post who is the author of this mod!
And if is yours why you have defined so mutch $user variables! NVM you know better probably!

Bug Fix for TBDEV 2009(final)

Open admin/changename.php

Find ( must be at line 55 )
Code:
if ($HTTP_SERVER_VARS['REQUEST_METHOD'] == 'POST'){
and replace with
Code:
if ($_SERVER['REQUEST_METHOD'] == 'POST'){
Adding Secure that users can`t modify highter or same class as their ( Unfortunately they cant modify even them selfs! I must thing about a solution which will give access to owners, but not now!)

Find
Code:
$username = sqlesc ($username);
Add Under
Code:
$maxclass = $CURUSER['class'] - 1;
Find
Code:
mysql_query ('UPDATE users SET username=' . $username . ', modcomment=CONCAT(' . sqlesc ($modcomment . '') . ', modcomment)  WHERE id=' .sqlesc($id));
and Replace with
Code:
mysql_query ('UPDATE users SET username=' . $username . ', modcomment=CONCAT(' . sqlesc ($modcomment . '') . ', modcomment)  WHERE id=' .sqlesc($id). 'AND class<='.$maxclass);
add Under last replaced
Code:
print("{$lang['text_forbbidden']}<br />{$lang['text_forbbidden_change']}");
Find
Code:
header ('Location: userdetails.php?id=' . $id);
and Replace with
Code:
header ('refresh: 5; userdetails.php?id=' . $id);
Open lang/lang_ad_changen.php

Add
Code:
'text_forbbidden' => "Acceess Danied!",
'text_forbbidden_change' => "<font color='red'><b>You CANNOT modify users of the same or highter class :!:<br /></b></font>",

That should be all !
Reply With Quote
The Following User Says Thank You to vendola For This Useful Post:
FlashBR (10th April 2016)
Reply

Tags
change , staff , user

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 06:48. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2022, vBulletin Solutions Inc.