Integrate Smarty Site with Drupal site -
Integrate Smarty Site with Drupal site -
i working on site on smarty based.the name of site http://example.com
i built new folder in root path , installed droupon (which component of drupal buying or creating deal) on folder.the site url http://example.com/coupon
now want integrate or merge 2 sites.so when registered user access example.com
can access example.com/coupon
session user id.
but problem.
is possible pass info smarty based site (example.com
) drupal site example.com/coupon
?
please help me.
i write @ module in drupal looks @ $_session , creates and/or login user @ drupal-site. perhaps rules module can work, need implement rules-hook grab relevant session info input rules component.
here few lines of code of work need implement hook_menu aswell register entrypoint integration.
//register user $passwd = user_password(); $edit = array( 'name' => $_session['username'], 'pass' => $passwd, 'mail' => $_session['email'], 'init' => $_session['email'], 'status' => 1, 'access' => request_time, ); $uu = drupal_anonymous_user(); $u = user_save($uu, $edit); //login global $user; $user = user_load($u->uid); $login_array = array ('name' => $username); user_login_finalize($login_array);
however, im not sure best way go it. sharing info in same session-namespace between 2 different applications lead errors on both sides. not improve implement whole site in drupal beginning?
drupal drupal-7 smarty
Comments
Post a Comment