Hi everyone,
This is the first time I use PHP, so it's very exciting + somewhat
confusing at the same time. Currently I have a board runs on
SimpleMachineForum software with 10000+ members and I want to use SMF's
authentication system for the project Im working on (reasons: well, the
current project is kinda like a plugin for the current board and I dont
want have 10000+ members re-register again or have to re-login when
they switch between the 2 applications.

Actually SMF made it very easy to integrate, all I have to do is:
<?php
require_once('/path/SSI.php');
// Then I can call
$is_guest = $context['user']['is_guest']; // return true if the user
has not logged in
$is_admin = $context['user']['is_admin']; // return true if the user is
admin
// etc......
?>

However,I dont know what would be a good way to integrate it into my
Cake application? Should I  use the simpleAuthentication and make some
small changes like this:

<?php
class UsersController extends AppController {

        function login()
        {
        // Just some example, wouldnt really work

        // Should I include an external file like this?
        require_once('/path/SSI.php');
        if(!$context['user']['is_guest'])
                   {
                   // set some user info here
                   $this->data['User']['username'] =
$context['user']['name'];
                   // etc
                   //sets up the session vars
                   $this->rdSimpleAuth->set($this->data['User']);
                   }
         }                              
 
}

Thank you very much for helping this noob *_*


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to