[Cartoweb-users] login
Oliver Christen
oliver.christen at camptocamp.com
Fri May 29 08:05:43 EST 2009
Hi
you can access the cartoweb context by initialising some basic cartoweb
objects, like this:
<?php
$_ENV['CW3_PROJECT'] = 'your_project';
if (!defined('CARTOCLIENT_HOME'))
define('CARTOCLIENT_HOME', realpath(dirname(__FILE__) .
'/../../..') . '/');
if (!defined('CARTOCOMMON_HOME'))
define('CARTOCOMMON_HOME', CARTOCLIENT_HOME);
require_once(CARTOCOMMON_HOME . 'common/Common.php');
Common::preInitializeCartoweb(array('client' => true));
require_once(CARTOCLIENT_HOME . 'client/Cartoclient.php');
$cartoclient = new Cartoclient();
if (!$cartoclient->clientAllowed()) {
return;
}
/* do whatever you want after this */
?>
this exemple works for a file placed into
cartoweb3/projects/your_project/htdocs/, simply adapte the paths if you put
the files somewhere else
by using the $cartoclient object, you can also access to all the user/auth
functions of cartoweb if needed
regards
Oliver
> Hi,
> I'd like to use cartoweb authentication for other application too.
> I'd like to login without map.
> Is it possible please?
>
> There is a link for login page:
> http://localhost/mapserver/htdocs/myproject.php?login=y&project=myproject
>
> After login goes map but I want other page from
> projects/myproject/htdocs/ (userManager.php)
>
>
> for example by parameter appLink in url query:
> http://localhost/mapserver/htdocs/myproject.php?login=y&project=myproject&appSwitch=userManager
>
>
>
> Thank you
>
> wochter
>
>
> --
> Keep e-mail messages readable by any computer system.
> Keep it ASCII.
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>
More information about the Cartoweb-users
mailing list