Quick Authentication
Posted by Brian Moon
|
Re: Quick Authentication September 12, 2005 12:33PM |
Registered: 21 years ago Posts: 50 |
Hi there!
Like Portal of Curiousity, i receive the same error message when using this script:
Warning: Invalid argument supplied for foreach() ...
foreach($USER["user_data"] as $key=>$data){
Any idea why this error occurs?
By the way - when changing the foreach loop into a while loop, all works perfectly for me.
thanks
Like Portal of Curiousity, i receive the same error message when using this script:
Warning: Invalid argument supplied for foreach() ...
foreach($USER["user_data"] as $key=>$data){
Any idea why this error occurs?
By the way - when changing the foreach loop into a while loop, all works perfectly for me.
thanks
|
Re: Quick Authentication September 12, 2005 12:45PM |
Admin Registered: 22 years ago Posts: 8,532 |
|
Re: Quick Authentication September 12, 2005 12:50PM |
Registered: 21 years ago Posts: 50 |
|
Re: Quick Authentication September 12, 2005 01:01PM |
Admin Registered: 25 years ago Posts: 4,504 |
Are you using the most recent version of the script? That was a problem a long while ago, but fixed for some time.
noe Wrote:
-------------------------------------------------------
> Hi there!
>
> Like Portal of Curiousity, i receive the same
> error message when using this script:
>
> Warning: Invalid argument supplied for foreach()
> ...
> foreach($USER["user_data"] as $key=>$data){
>
> Any idea why this error occurs?
>
>
> By the way - when changing the foreach loop into a
> while loop, all works perfectly for me.
>
> thanks
noe Wrote:
-------------------------------------------------------
> Hi there!
>
> Like Portal of Curiousity, i receive the same
> error message when using this script:
>
> Warning: Invalid argument supplied for foreach()
> ...
> foreach($USER["user_data"] as $key=>$data){
>
> Any idea why this error occurs?
>
>
> By the way - when changing the foreach loop into a
> while loop, all works perfectly for me.
>
> thanks
Brian - Personal Blog
|
Re: Quick Authentication September 12, 2005 01:12PM |
Registered: 21 years ago Posts: 50 |
brianlmoon Wrote:
-------------------------------------------------------
> Are you using the most recent version of the
> script? That was a problem a long while ago, but
> fixed for some time.
Yes, it is the latest version.
I have really no idea why this error occurs :\
- But would there be any negative effect when i use the while loop instead of the foreach loop? (because, as mentioned, using the while loop seems to work for me)
-------------------------------------------------------
> Are you using the most recent version of the
> script? That was a problem a long while ago, but
> fixed for some time.
Yes, it is the latest version.
I have really no idea why this error occurs :\
- But would there be any negative effect when i use the while loop instead of the foreach loop? (because, as mentioned, using the while loop seems to work for me)
|
Re: Quick Authentication September 12, 2005 01:17PM |
Admin Registered: 25 years ago Posts: 4,504 |
|
Re: Quick Authentication September 12, 2005 01:35PM |
Registered: 21 years ago Posts: 50 |
brianlmoon Wrote:
-------------------------------------------------------
> what kind of while loop?
>
> Brian.
> Phorum Hacker
> [phorum.org]
ups sorry - I just noticed that my while loop is nonsense - it does exactly nothing. (Deleting the foreach loop would have produced the same effect)
So to summarize - Using the original script works, but I still get the foreach() Error message.
*hmmm*
-------------------------------------------------------
> what kind of while loop?
>
> Brian.
> Phorum Hacker
> [phorum.org]
ups sorry - I just noticed that my while loop is nonsense - it does exactly nothing. (Deleting the foreach loop would have produced the same effect)
So to summarize - Using the original script works, but I still get the foreach() Error message.
*hmmm*
|
Re: Quick Authentication September 12, 2005 02:49PM |
Registered: 21 years ago Posts: 50 |
ok - i got the solution for my problem.
The problem was, that i had not specified any user_data (in the user profil) for these user-test-accounts, so the array was not filled up with data and put out this error message;
But if this is the reason, it seems that the script is a little bit buggy - Im quite sure that not every registered user is going to fill his additional user fields(?)
bw,
noe
The problem was, that i had not specified any user_data (in the user profil) for these user-test-accounts, so the array was not filled up with data and put out this error message;
But if this is the reason, it seems that the script is a little bit buggy - Im quite sure that not every registered user is going to fill his additional user fields(?)
bw,
noe
|
Re: Quick Authentication September 12, 2005 03:07PM |
Admin Registered: 25 years ago Posts: 4,504 |
yeah, I guess it should check that. Odd that there is no data in there at all though.
Brian - Personal Blog
|
Re: Quick Authentication September 12, 2005 03:34PM |
Registered: 21 years ago Posts: 50 |
brianlmoon Wrote:
-------------------------------------------------------
> Odd that there is no data in there at all though.
Hmmm - Should the user_data field normally be filled with something, even though the user does not configure/insert anything? (neither a real name, nor a signature ...?)
-------------------------------------------------------
> Odd that there is no data in there at all though.
Hmmm - Should the user_data field normally be filled with something, even though the user does not configure/insert anything? (neither a real name, nor a signature ...?)
Sorry, only registered users may post in this forum.

