vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Problems in user.php (https://vborg.vbsupport.ru/showthread.php?t=41867)

Dean C 08-03-2002 07:28 PM

Problems in user.php
 
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 :D

Thanks in Advance

- Mist

Xenon 08-03-2002 10:56 PM

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.

Dean C 08-04-2002 01:47 PM

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 :D

- Mist

Xenon 08-04-2002 02:01 PM

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... ;)

Dean C 08-04-2002 08:29 PM

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 :D

Xenon 08-04-2002 08:35 PM

:)
you're welcome

i hope everything is right now

Dean C 08-05-2002 09:43 AM

it is :D


All times are GMT. The time now is 07:05 AM.

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.01153 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete