User.login?

Events happening in the community are now at Drupal community events on www.drupal.org.
newms's picture

Hi,

I am trying to use the user service from a flex app. However, whenever I use the user.login method I get a Flex error

[RPC Fault faultString="Wrong username or password." faultCode="AMFPHP_RUNTIME_ERROR" faultDetail="/*****/modules/amfphp/amfphp.module on line 101"]

I am certain that I am using the correct username/password. The actionscript code I use to call the method is:

                        public function login(event:Event):void
          {
              user.login(username.text, password.text);
             
           }

Any ideas on why the user.login method is not working for me?

Comments

Echo test

Chris Charlton's picture

Are all other services connecting fine? Like at least an echo() return test?

Chris Charlton, Author & Drupal Community Leader, Enterprise Level Consultant

I teach you how to build Drupal Themes http://tinyurl.com/theme-drupal and provide add-on software at http://xtnd.us

Hi, Yes other services work

newms's picture

Hi,

Yes other services work just fine. I'm using the node and views services as well as a few custom ones. I'm not using sessid if that helps.

Have you tested in the Service Browser?

Chris Charlton's picture

Have you tested the User.login from your [Drupal] Service Browser?

Chris Charlton, Author & Drupal Community Leader, Enterprise Level Consultant

I teach you how to build Drupal Themes http://tinyurl.com/theme-drupal and provide add-on software at http://xtnd.us

Hey thanks for your

newms's picture

Hey thanks for your suggestion. It actually led me in another direction to figure out what the problem was. I can actually login with a local account, but I wasn't able to login with my LDAP account which is what I was trying to do. I'll look at the user_service.module to see why I'm not able to authenticate via LDAP.

Ok, if I change $user =

newms's picture

Ok, if I change

$user = user_authenticate($username, $password);

in the user_service_login function to

$user = _ldapauth_user_authenticate($username, $password);

then I am able to login via LDAP from my flex app. Its a hack, but it will work until I find a more elegant way. Thanks for the help.

user.login with ldap_integration

windsurf's picture

I have just written a new module that replaces the Services user module called ldapuser which has ldapuser.login. So far it's working. I'm going to take it a bit further so I can retrieve members then I'll contribute it. I'm interested to know if anyone's already done this? Am I recreating something existing? Is anyone else interested in this module? It would be cool to get some collaboration on it.

Services

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: