Share » Forums » Developer » Login and siteaccess change

Login and siteaccess change

Login and siteaccess change

Wednesday 18 July 2007 9:39:20 am - 2 replies

Author Message

Maxime Thomas

Wednesday 18 July 2007 10:34:51 am

The solution !

//Includes
include_once( "lib/ezutils/classes/ezsession.php");
include_once( "access.php");

//Changing the siteaccess
$access=array("name"=>"cse", "type"=>EZ_ACCESS_TYPE_URI);
eZSys::clearAccessPath();
changeAccess($access);

//Creating a new session for the currently login user
eZSessionStop();
eZSessionStart();			

//Regenerate the id of the session and Login
session_regenerate_id();
eZLDAPUser::loginUser($email, '', false, true);

//Redirect
$Module->redirectTo("/");

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

H-Works Agency

Wednesday 06 July 2011 7:09:47 am

Hi,

I tried your technique but its not working for me.

What is the method to enable a user on site A to execute a ezpublish method that would log him on site B ?

EZP is Great

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu