RE: Open Issue :: inactive...
"Jan Bolmeson" <[email protected]> Tue, 16 Aug 2005 11:12:32 +0200
| Newsgroups | gmane.comp.php.pear.liveuser |
|---|---|
| Message-ID | <[email protected]> |
I am using DB - the problem seems to be that when is_active is set to 0 in
the db it is returned as:
array(5) {
auth_user_id => string(32) 8ca795cab0f1c244cc78fffd3387013d
handle => string(6) madwax
passwd => string(32) f3bfc29c228b806b6a03513f5c7c149b
is_active => string(0)
lastlogin => int 1124182373
}
And hence both:
// this->propertyValues['is_active'] = string(0)
If( this->propertyValues['is_active'] !== false)
// this->propertyValues['is_active'] = int 0
If( this->propertyValues['is_active'] !== false)
Evaluates to TRUE (incorrectly)
----------------------------
Whereas
// this->propertyValues['is_active'] = int 0
If( this->propertyValues['is_active'] != false)
// this->propertyValues['is_active'] = string(0)
If( this->propertyValues['is_active'] != false)
Evaluates to FALSE (correctly)
------------------------------
Thus, my solution is to change the if-condition from:
if (array_key_exists('is_active', $this->propertyValues) &&
$this->propertyValues['is_active'] !== false ) {
TO:
if (array_key_exists('is_active', $this->propertyValues) &&
$this->propertyValues['is_active'] != false ) {
In Auth\Common.php (approx line 440)
But I don't know how other containers will respond to the change...
Regards,
Jan
> Jan Bolmeson wrote:
> > Maybe just on my system due to my modifications but; since the is_active
> fix
> > users with is_active == 0 are able to log in...
> >
> > Could somebody verify?
>
> What backend are you using?
> I have a hunch that this is a DB backend problem ..
> Because in MDB/MDB2 it would be true not 0 ...
>
> regards,
> Lukas
>
>
> _______________________________________________
> LiveUser mailing list
> [email protected]
> http://mailman.21st-hq.de/mailman/listinfo/liveuser