Closed (fixed)
Project:
Services
Version:
7.x-3.1
Component:
Documentation
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Jun 2012 at 03:03 UTC
Updated:
19 Jul 2012 at 17:31 UTC
Jump to comment: Most recent file
Comments
Comment #1
drewschmaltz commentedObviously I was wrong about this being a feature request as it is already handled by system connect. I now need help: my system connect returns nothing at all.
Comment #2
drewschmaltz commentedI would recommend changing the system.connect to read what it actually does. I would recommend changing what it returns.
If you don't pass it a sessionid - it would error: "no sessionid".
If you pass it a session variable but it is invalid or expired it says "invalid or expired sessionid".
If you pass it a session variable and there's a valid sessionid it returns the user information.
EITHER WAY.
Here's my function that uses my class. I'm a bit of a amateur so, if anyone sees a better way of doing this, please let me know...
Comment #3
drewish commentedYeah that does seem confusing, system.connect *says* it returns "the details of a new anonymous session" but it looks like it should return any user.
Update: that should have read the *current* user... which might be anonymous.
Comment #4
ygerasimov commentedsystem.connect return drupal object of current user. So if you have session id just put it in the cookie and check what user system.connect will return. If it is user you expect -- he is still logged in. If anonymous user -- your session has expired. I don't think we need to change this.
Here is code of system.connect callback
Comment #5
drewish commentedygerasimov, then "the details of a new anonymous session" is incorrect, it's the current session. we need to fix the docs for that. and we should also expose a description in the UI since it's not at all obvious what that method does unless you open up the code.
Comment #6
ygerasimov commentedAh. Understand. Do you think attached patch changes are good enough description?
I completely agree that it would be nice to have description of actions, relationships and targeted_actions in the UI. But I think we should create separate issue for this.
Comment #8
drewish commentedYeah that's great.
Comment #9
ygerasimov commentedI have added 'help' property of the connect method and comitted to both 7.x-3.x and 6.x-3.x branches.