We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

users from another login to Oxwall CMS | Forum

UTAN
UTAN Sep 4 '13
Hi guys and Gals,

I am pretty new to this awesome software, I am currently working in draft site , trying to change appearance and so..

What I want if to be directed in how to transfer my user database from a login i wrote to oxwalls , what I am thinking to do is to require some oxwalls core documents in the php that process my login and create a new user in Oxwalls if successful logged..

I am been looking around and found class BOL_User extends OW_Entity and tried to use its methods but I think I need to initiate some Oxwall cores first which I have no idea where to start, anyone has some direction or pieces of code example so I can play around?

regards
UTAN
UTAN Sep 4 '13
Well thanks, Let's see how far i go?

I got this so far, it should start the session I think.. Lets keep digging

define('_OW_', true);

define('DS', DIRECTORY_SEPARATOR);

define('OW_DIR_ROOT', dirname(__FILE__) . DS);

require_once(OW_DIR_ROOT . 'ow_includes' . DS . 'init.php');

OW::getSession()->start();

?>


ross Team
ross Sep 4 '13
Topic was moved from General Questions.
UTAN
UTAN Sep 5 '13
Sorry, I thought it was the right place but I don't think I will have better luck here..
so thanks anyways.
Daisy Team
Daisy Sep 5 '13
Neumann, please take a look at the related thread: http://www.oxwall.org/forum/topic/8727

Also, you can check the Facebook connect plugin as an example where you can find all necessary information about how Oxwall handle the information from the third-party site and how to authenticate users using third-party information.

If I took you wrong - please provide me with more details.
The Forum post is edited by Daisy Sep 5 '13
UTAN
UTAN Sep 5 '13
Thank Daisy,

I will give it a read to see if I can come up with something.. again my respect to you.
UTAN
UTAN Sep 6 '13
So, I manage to do just what I wanted while I finish my site based on Oxwall CMS..
Here is what I did:

<?php
          define('_OW_', true);
         
           define('DS', DIRECTORY_SEPARATOR);
     
           define('OW_DIR_ROOT', $_SERVER['DOCUMENT_ROOT'] .'/dating/');// test site

           require_once(OW_DIR_ROOT . 'ow_includes' . DS . 'init.php');
         
           OW::getSession()->start();

          $isLogged = logUserin(); // returns Json response
             
               $isLogged = json_decode($isLogged);
             
               if($isLogged->res && $isLogged->user){
                   try
                   {
                    BOL_UserService::getInstance()->createUser( $isLogged->user->username , $isLogged->user->password , $isLogged->user->email , null, true );
                   }
                   catch ( Exception $e )
                   {
                      // here to show err to clients
                   }
               }
?>

So if the user login to your all system while you are in development, this user will be registered with his/her pass and login username..

Hope this helps someone in the future..
The Forum post is edited by UTAN Sep 6 '13
kalvindarwan
kalvindarwan Dec 21 '23
Our team knows how to identify such advanced faults and will be quite resourceful in helping you here too. Granite Bay Fence Company
James Walter
James Walter Jan 2
Whether your company has a fleet of 20 trucks or just 3, we will treat them with the same dedication. Las Cruces Mobile Truck Repair
anna
anna Feb 26
I like what you posted. I've read a lot of books that are similar! In contrast to other writings, yours really made an impact on me. It's great that you write thoughtful posts like this one. Please keep them coming! nytimes crossword