Make a Lasting Impression

Join the Mailing List

Who's Online

13 user(s) are online (10 user(s) are browsing Support Forums)

Members: 0
Guests: 13

more...
ImpressCMS proudly uses SourceForge
ImpressCMS on Ohloh.net





Find user PHP-Error
Home away from home
Joined:
2009/11/16 14:36
From Germany
Posts: 171
Hello Community,
on one of my sides I have more Users, then the "Select user"-field shows. Below this field is a Link "find users". You can find this select field here: /system/modules/profile/admin/user.php and also in some Moduls, like the new article-modul (published by optin there).

If I click the link, it opens a pop-up with a form. When I type a name of a User in this form and click the submit-button, i got these error-msg:

Benutzer finden »» Suchergebnisse

1 Benutzer gefunden

Fatal error: Call to a member function getVar() on a non-object in .../icms/include/findusers.php on line 419

This is fatal, because I need this function. There is another way to find users, the "find user"-page. This page work and i can find users, but modules do not offer this page.

Would be nice if someone can help to fix this problem.

Posted on: 2012/2/4 0:11

Edited by skenow on 2012/2/15 19:02:42
Transfer the post to other applications Transfer


Re: Find user PHP-Error
Home away from home
Joined:
2009/5/27 12:50
From Germany
Posts: 1197
Coud you post this line of code +10 lines above please?

Posted on: 2012/2/4 8:50
_________________
the german icms website : www.impresscms.de
Transfer the post to other applications Transfer


Re: Find user PHP-Error
Home away from home
Joined:
2010/2/12 23:04
From Germany
Posts: 679

if (!empty($foundusers)) {
            echo 
"<form action='findusers.php' method='post' name='{$name_form}' id='{$name_form}'>
            <table width='100%' border='0' cellspacing='1' cellpadding='4' class='outer'>
            <tr>
            <th align='center' width='5px'>"
;
            if (!empty(
$_POST["multiple"])) {
                echo 
"<input type='checkbox' name='memberslist_checkall' id='memberslist_checkall' onclick='xoopsCheckAll("{$name_form}", "memberslist_checkall");' />";
            }
            echo 
"</th>
            <th align='center'>"
._MA_USER_UNAME."</th>
            <th align='center'>"
._MA_USER_REALNAME."</th>
            <th align='center'>"
._MA_USER_REGDATE."</th>
            <th align='center'>"
._MA_USER_LASTLOGIN."</th>
            <th align='center'>"
._MA_USER_POSTS."</th>
            </tr>"
;
            
$ucount 0;
            foreach (
array_keys($foundusers) as $j) {
                if (
$ucount == 0) {
                    
$class 'even';
                } else {
                    
$class 'odd';
                }
                
$ucount++;
                
$fuser_name $foundusers[$j]->getVar("name") ? $foundusers[$j]->getVar("name") : "&nbsp;";

The last line is the requested one.

Posted on: 2012/2/4 9:06
Transfer the post to other applications Transfer


Re: Find user PHP-Error
Home away from home
Joined:
2009/5/27 12:50
From Germany
Posts: 1197
Would you please provide a var_dump of $foundusers (anonymized if neccessary) and $j just before the fatal error?

Posted on: 2012/2/4 10:59
_________________
the german icms website : www.impresscms.de
Transfer the post to other applications Transfer


Re: Find user PHP-Error
Home away from home
Joined:
2009/11/16 14:36
From Germany
Posts: 171
here is the result for $foundusers:

1 Benutzer gefunden
array(1) { [0]=> string(1"6" 
Fatal errorCall to a member function getVar() on a non-object in /<path_removed>/icms/include/findusers.php


"6" is the correct user-id.

and for $j

1 Benutzer gefunden
int
(0
Fatal errorCall to a member function getVar() on a non-object in /<path_removed>/icms/include/findusers.php on line 420

Posted on: 2012/2/8 13:08

Edited by fiammybe on 2012/2/15 20:23:43
Transfer the post to other applications Transfer


Re: Find user PHP-Error
Home away from home
Joined:
2009/11/16 14:36
From Germany
Posts: 171
request help here :)
please...

Posted on: 2012/2/10 11:49
Transfer the post to other applications Transfer


Re: Find user PHP-Error
Home away from home
Joined:
2009/5/27 12:50
From Germany
Posts: 1197
What's the syntax of your var_dump? In case the array only contains one item with a string there error makes sense because a string doesn't offer methods such as getVar.
The foundusers array is built in 320 to 325. Check if everything is correct there.

Posted on: 2012/2/10 14:29
_________________
the german icms website : www.impresscms.de
Transfer the post to other applications Transfer


Re: Find user PHP-Error
Home away from home
Joined:
2009/11/16 14:36
From Germany
Posts: 171
I did some tests and chat with phoenyx.
But he does not longer support icms, so I need someone else, how can help me, with this issue.

some test-results:
I put this line in the code:

var_dump
($foundusers[6]);

and got:

1 Benutzer gefunden
NULL 
Fatal error
Call to a member function getVar() on a non-object in .../icms/include/findusers.php on line 420


phoenyx reaction was:
"this makes no sense...
arraykeys($foundusers) delivers [0] => 6
why does $foundusers[6] should not exist?"

That's it.
So, here I stand now, knowing nothing to do :S

please help :)

Posted on: 2012/2/15 11:37
Transfer the post to other applications Transfer


Re: Find user PHP-Error
Home away from home
Joined:
2009/11/16 14:36
From Germany
Posts: 171

Posted on: 2012/2/15 18:35
Transfer the post to other applications Transfer






You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]