Hello all! I'm having a little trouble finding detailed resources that explain how to manage users from inside a flash interface. I have a flash app that launches independent of Drupal, meaning the user can either access the flash system through Drupal or simply launch it by visiting a direct link. I want the user to be able to either login through the Drupal site or through the flash interface, so once the user is inside flash I need the system to check:
1) Is the user already logged in?
2) If yes, continue to load content. If not, provide a login form that will use the user.login service to authenticate.
It's #1 that I am unsure about. I was thinking I could use user.get to test for the user id or user role, but it requires user id as a parameter. Because of this, I need to know the user id prior to calling the user.get service. What is the best way of getting the uid into flash? passing in as a flash variable? creating a custom service to handle this? Will I need to give service access to anonymous? What security issues should I be watching out for?
Sorry the questions are basic. I'm new to drupal-flash communications. Any info you can provide would be fantastic. Thanks!
Comments
I Had Overlooked
system.connect already returns the user object so I can access the uid from that. I'm assuming I can just test for a value of 0 to look for an anonymous user. uid gets converted to userid with the amfphp module, so it must be accessed at user.userid with actionscript.
Have you got this to work
Have you got this to work for you as of yet?
I have tried many examples of
I have tried many examples of how to interface flash with php and its working fine but now i need to print hook_form in flash applet .....
Is this possible to print hook_form in flash ? if it is please can u give me some tips or tell me how can i do this...
Thanks,