god/admin profile problem

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 06-27-2007, 12:12 AM
bichopro's Avatar
New Pligger
 
Join Date: Feb 2007
Posts: 9
only to id user 1 (Admin/god)

when i try to click in my own profile the database send me this message

Quote:
Warning: Invalid argument supplied for foreach() in /home/wi180055/public_html/beta/libs/utils.php on line 406
invalid username or userid in get_avatar
the four line is the 406 - begin with foreach...

PHP Code:
// using this because i'm not sure if (array)$user will work in php 4
    // i'm not sure if we even need all this but it makes my code work 
    
$array = array();
    foreach (
$result as $key=>$value) {
        if (
is_object($value)) {
            
$array[$key]=object_2_array($value);
        }
        elseif (
is_array($value)) {
            
$array[$key]=object_2_array($value);
        }
        else {
            
$array[$key]=$value;
        }
    }
    return 
$array;


function 
phpnum() { 
any solution?

I use 9.5 with the login patch (2) and this is so rare because i don't touch the database.
sorry my so bad inglish

Update: all user profile in my site is good, but when a user try to watch my profel (user id 1 god admin) see the error

Last edited by bichopro; 06-27-2007 at 04:15 AM. Reason: update
Reply With Quote
  #2 (permalink)  
Old 06-27-2007, 02:52 PM
bichopro's Avatar
New Pligger
 
Join Date: Feb 2007
Posts: 9
this user have same problem when click in second page from the popular page

I've got a strange error
Reply With Quote
  #3 (permalink)  
Old 06-27-2007, 07:29 PM
bichopro's Avatar
New Pligger
 
Join Date: Feb 2007
Posts: 9
i try the solution of this user but nothing happens

Can help me please?
Reply With Quote
  #4 (permalink)  
Old 07-09-2007, 12:28 AM
Pligg Donor
 
Join Date: Mar 2007
Posts: 85
Quote:
Originally Posted by bichopro View Post
i try the solution of this user but nothing happens

Can help me please?
I'm getting this same error. I removed all comments, votes, links and then the users from the table (all were faux data). Then I get this error for 3 users (God, and two others) when trying to access the profiles for each:

invalid username or userid in get_avatar

I also then went into the friends table, to update (remove) any ids associated with deleted users. I still get the error.

I also emptied the cache.

I'd rather not repopulate the database with bad data. Is there another fix for this? Can anyone tell me where the code that generates the error is so I can check the SQL statment?

Thanks!
Reply With Quote
  #5 (permalink)  
Old 07-09-2007, 01:21 AM
Pligg Donor
 
Join Date: Mar 2007
Posts: 85
Quote:
Originally Posted by betagirl View Post
I'm getting this same error. I removed all comments, votes, links and then the users from the table (all were faux data). Then I get this error for 3 users (God, and two others) when trying to access the profiles for each:

invalid username or userid in get_avatar

I also then went into the friends table, to update (remove) any ids associated with deleted users. I still get the error.

I also emptied the cache.

I'd rather not repopulate the database with bad data. Is there another fix for this? Can anyone tell me where the code that generates the error is so I can check the SQL statment?

Thanks!
OK, not sure what I did that, but instead of restoring the database, I went through every table and deleted any reference to a user_id that I had deleted. That seemed to fix it. (so in addition to the above tables, I removed any records referring to deleted users in trackbacks, friends and pageviews).

Profile pages work fine now.
Reply With Quote
  #6 (permalink)  
Old 08-08-2007, 05:42 AM
Casual Pligger
 
Join Date: Mar 2007
Posts: 48
betagirl - i had the same problem after using a modified killspam - this took care of it -thank you.
Reply With Quote
  #7 (permalink)  
Old 08-09-2007, 03:59 AM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
Modified killspam is here: http://forums.pligg.com/general-help...pambruise.html
Reply With Quote
  #8 (permalink)  
Old 08-09-2007, 10:25 PM
Casual Pligger
 
Join Date: Mar 2007
Posts: 48
FYI - I was also receiving a 406 error when reading private messages because they were coming from user 1 (god) in the welcome_privmsg_main and I had deleted him. After switching this value to antoher user it was resolved.
Reply With Quote
  #9 (permalink)  
Old 08-10-2007, 03:34 AM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
This was your only problem with the modified killspam? Then I will try it.
Reply With Quote
  #10 (permalink)  
Old 08-10-2007, 10:08 PM
Casual Pligger
 
Join Date: Mar 2007
Posts: 48
I was basically getting a 406 when I went to some of the user profiles. I had to remove any references to the deleted users in every table they were referenced in the database. The reference to the welcome_privmsg_main may is only relevant if you killspam God.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fixes to Profile Extra Fields Module v0.2 and Extended Profile Module v0.1 redwine Questions and Comments 11 12-20-2010 04:18 PM
Categoy Sidebar Problem in Profile Page werushka Questions and Comments 4 02-09-2008 11:07 PM
Tabbed Menu and Profile!!! Just about done... Genghis Questions and Comments 1 05-11-2007 04:43 AM
Formating problem with IE7 in user profile holspar Questions and Comments 3 03-29-2007 01:55 AM
Problem display profile kultura Questions and Comments 0 12-19-2006 10:00 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development