[dev] getting a user's prefs without loggin the user

Atif Ghaffar aghaffar@developer.ch
Thu, 12 Jul 2001 01:59:40 +0200


Jon, thanks for your help, but the code that you show me does not work.
See http://www.aghaffar.ispman.net/jonp.php  (and phps for the source)
Also see
http://www.aghaffar.ispman.net/test.php  (and phps for the source)

any ideas?

cheers


Jon Parise wrote:
> =

> On Tue, Jul 10, 2001 at 01:49:13PM -0400, Chuck Hagenbuch wrote:
> =

> > > So is it possible to call $prefs->getValue("something") without log=
ging
> > > in as that user?
> >
> > You can put whatever username you like in the Prefs::factory() call.
> =

> Right.  Atif's example could look like this:
> =

> <?
> define('HOMEPAGE_BASE', dirname(__FILE__));
> require HOMEPAGE_BASE . '/../config/horde.php';
> require HOMEPAGE_BASE . '/../lib/Horde.php';
> require HOMEPAGE_BASE . '/../lib/Prefs.php';
> =

> $_server_name=preg_replace("/www\./", "", $SERVER_NAME);
> $_user_name=str_replace('.', "_", $_server_name);
> =

> $prefs = Prefs::factory($conf['prefs']['driver'] , "" ,
>                         $_user_name, "", $conf['prefs']['params']);
> ?>
> =

> --
> Jon Parise (jon@csh.rit.edu)  .  Rochester Inst. of Technology
> http://www.csh.rit.edu/~jon/  :  Computer Science House Member
> =

> --
> Horde Developers mailing list: http://horde.org/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe@lists.horde.org

-- 
Atif Ghaffar
Internet Development Manager
4unet AG/SA/Ltd.
---------------------------.
          +41 21 351 53 60 ¦ voice
          +41 79 659 89 72 ¦ mobile
          +41 21 254 53 62 ¦ fax
      http://www.4unet.net ¦ www
http://www.atifghaffar.com ¦ homepage
    atif.ghaffar@4unet.net ¦ email