Posted by wishbone on February 2, 2008 at 5:11pm
Any docs out there (or example) of logins from Flash to Drupal?
Has this been done before?
Any help is appreciated.
Any docs out there (or example) of logins from Flash to Drupal?
Has this been done before?
Any help is appreciated.
Comments
+1 passing userID
+1 looking for doc's that explain a successful example passing userID's, sessionID, and registration service.
on
on http://devzone.zend.com/article/2660-Reading-And-Writing-Drupal-With-Flex you find an example to login.
I didn't test it yet.
Maybe it helps you on the way
I've done it
wishbone:
You can use the user service, part of the standard services module (http://drupal.org/project/services) to login a user from Flex. It has two procedures: 1 for login and 1 for logout. Simply pass the username/passwd from flex. There are examples on using the node service. Follow that, but replace the node service calls with the user service calls, and you should be in business.
tourguide:
Here's what I did on the server/drupal side:
1. Create a service called userservice
2. Create a procedure (eg returnuid) that returns an item (i.e. array or int)
3. In the procedure, do this:
global $user;
return $user->uid;
This'll return the userid. Simply call userservice.returnuid from flash.
A bit late, but oh well
I know this is a long way out from when this post was originally made, but if you are still interested in this and never took the time to research it a lot, I figured out how to successfully process a login through a flash document. (One that is embedded or external for that matter.) It does not eve require AMFPHP to be installed on the system. (Which is good because last I checked the services module which AMFPHP depends on does not yet have a recommended status.)
I set up a demo page here: AS3 Login Demo Page
You can login and logout, and it will detect if you are already logged in. It is still a work in progress, but most of the stuff you need is laid out for you.
If you want to see the documentation and want a copy of the source all of that is available here: www.andrewnprice.com
I hope that helps. I should be making an update to that demo sometime in the next week, so check back if you want some of the other features I mention adding in the post.