[pLog-svn] isAdmin not working

Oscar Renalias oscar at renalias.net
Mon Sep 19 06:29:56 GMT 2005


all you need to do is set the site_admin field in the plog_users table
to '1', clean your tmp/ folder (specially the tmp/cache/ folder) and
try again. I just tried and it worked fine for me :-)

You don't see the string site_admin almost at all in the code because
Mode::get() and Model::getMany() now generate their SQL queries
automatically, based on what fields are listed in the
DbObject::_fields array. It probably looks a bit more complicated, but
these methods help centralize the generation of SQL code as well as
dealing with caches transparently for classes extending the Model base
class...

Oscar

On 9/19/05, Jon Daley <plogworld at jon.limedaley.com> wrote:
>         I don't think this stuff is working at all.  Try grepping for
> site_admin, and you will see it isn't used anywhere, except for one place
> outside of the phpbb stuff.  (unless I broke it in the upgrade)
> 
> On Sun, 18 Sep 2005, Jon Daley wrote:
> >       Oscar said there is a new field in the database in 1.1 for
> > determining site admin.  That's all I know about that...
> >
> > On Sun, 18 Sep 2005, Reto Hugi wrote:
> >
> >> Hi,
> >>
> >> Did a fresh install from trunk and now I don't get recognized as a site
> >> admin although permissions in the database are set to 1.
> >>
> >> I'm still wondering where this actually "get"'s the information of the
> >> user from, because if I do a var_dump, I get the array with the userinfo
> >> all correct ,but isAdmin set to false.
> >>
> >> This function is part of ploguserdataprovider.class.php:
> >>
> >> function getUserInfoFromUsername( $username )
> >> {
> >>  return ( $this->get( "user", $username, CACHE_USERIDBYNAME,
> >>                   Array( CACHE_USERINFO => "getId" )) );
> >> }
> >>
> >> Can somebody please explain where this function get's the userinfo from?
> >> This is all magic to me...
> >>
> >> thanks & nice week :)
> >> reto
> >> _______________________________________________
> >> pLog-svn mailing list
> >> pLog-svn at devel.plogworld.net
> >> http://devel.plogworld.net/mailman/listinfo/plog-svn
> >>
> >
> > **************************************
> > Jon Daley
> > http://jon.limedaley.com/plog/
> >
> > I am the President of the United States, and I will not eat any more
> > broccoli!
> > -- George Bush Sr.
> > _______________________________________________
> > pLog-svn mailing list
> > pLog-svn at devel.plogworld.net
> > http://devel.plogworld.net/mailman/listinfo/plog-svn
> >
> 
> **************************************
> Jon Daley
> http://jon.limedaley.com/plog/
> 
> There's so much comedy on television.
> Does that cause comedy in the streets?
> -- Dick Cavett
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.plogworld.net
> http://devel.plogworld.net/mailman/listinfo/plog-svn
>



More information about the pLog-svn mailing list