Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=109)
-   -   Allow Staff to Change a User Name (http://www.bvlist.com/showthread.php?t=7813)

HUnter83 9th April 2012 17:05

Allow Staff to Change a User Name
 
2 Attachment(s)
open file admin.php and add

Code:

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

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

vendola 20th June 2012 08:21

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']}{$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' => "You CANNOT modify users of the same or highter class :!:",


That should be all !


All times are GMT +2. The time now is 11:57.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.