Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Problems in user.php Details »»
Problems in user.php
Version: , by Dean C Dean C is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 08-03-2002 Last Update: Never Installs: 0
 
No support by the author.

Whenever i try to edit a user in the admin cp ... i click save changed and get this error:

PHP Code:
There is already an [usernamed Mist 
obviously the username changes wen u edit a different user...

i installed the awards hack.. cudn't get it to work... so i uninstalled it and got a funny error..

i re-uploaded the original user.php...

and i got this error...

i thought i might be because i had installed the contributor label hack but hadn't applied the changes to user.php

so i did that and i still get the same error ...

hopefully some1 can help me out

Thanks in Advance

- Mist

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 08-03-2002, 10:56 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you must have this block in your user.php:
PHP Code:
    if ($exists=$DB_site->query_first("SELECT userid
                    FROM user
                    WHERE username='"
.addslashes(htmlspecialchars($ausername))."'
                        AND userid <> 
$userid")) {
        echo 
"There is already an ".makelinkcode('user',"user.php?do=edit&userid=$exists[userid]",1)." named <b>".htmlspecialchars($ausername)."</b>";
        exit;
    } 
if it doesn't exist in this form you don't have uploaded an original file.

as you can see the block is just executed if there is another user called "....".
so if you have this block correct, and and get this error when editing a user, you perhaps have a problem in your database.
Reply With Quote
  #3  
Old 08-04-2002, 01:47 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that code is already there... and its exactly the same as the code u gave me above...

and also i did upload the original and that didn't fix it... i have a feeling it has something to do with these querys i ran:

if u can give me thr query to reverse each one id give that a try:

Query1:
[sql]
CREATE TABLE award (
awardsid smallint(5) unsigned DEFAULT '0' NOT NULL auto_increment,
name varchar(60) NOT NULL,
url varchar(100) NOT NULL,
aw smallint(4) NOT NULL,
PRIMARY KEY (awardsid)
);
[/sql]

Query2:
[sql]
CREATE TABLE useraward (
id smallint(5) unsigned DEFAULT '0' NOT NULL auto_increment,
awardsid smallint(5) NOT NULL,
userid smallint(5) NOT NULL,
name varchar(60) NOT NULL,
url varchar(100) NOT NULL,
aw smallint(4) NOT NULL,
PRIMARY KEY (id)
);
[/sql]

Quer3:
[sql]
ALTER TABLE user ADD award TINYTEXT NOT NULL
[/sql]

Thanks in Advance

- Mist
Reply With Quote
  #4  
Old 08-04-2002, 02:01 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i'd say you should use phpmyadmin to delete the extra tables and the extrafield to user-table...

the queries should be:
DROP TABLE `award`
DROP TABLE `useraward`
ALTER TABLE `user` DROP `award`

then check your usertable if you have more users called Mist...
Reply With Quote
  #5  
Old 08-04-2002, 08:29 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i ran those queries with success...

and you were right... the problem was more than one user in the user table called "Mist" hehe.. dont know how it happened :S

Thanks for your help Xenon
Reply With Quote
  #6  
Old 08-04-2002, 08:35 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default


you're welcome

i hope everything is right now
Reply With Quote
  #7  
Old 08-05-2002, 09:43 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it is
Reply With Quote
Reply


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. The time now is 10:50 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07191 seconds
  • Memory Usage 2,265KB
  • Queries Executed 20 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete