eZ Community » Forums » Developer » Users management and the API......
expandshrink

Users management and the API... another long term discussion...

Users management and the API... another long term discussion...

Wednesday 22 February 2012 12:03:18 pm

Hi,

I have a few things in mind regarding how we can extend the user API in eZ Publish. This is an open topic and I'm thinking and writing at the same time so you might want to leave before reaching the end... happy.gif Emoticon

1. Login handler

Easy to implement, but see #3

2. SSO handler

Same as #1, but see #3

3. Extending eZUser class behavior

The handlers mentioned in #1 and #2 are supposed to return an eZUser instance. If you return a class extending eZUser, let's say MyeZUser, this works well but then, the final object being stored in the session is an eZUser one.

Then, all the call being made to the singleton methods eZUser::instance will return an eZUser  and that's something I would like to improve.

4. Logout handler

Afaik, this does not exist yet. 

Jérome suggested a solution based on redirecting the user on a dedicated module/view, but as said in his blog post, this is just a workaround.

@ eZ Systems engineers : what would be the best way to do that ? I mean, if I would develop my self and make a pull request in order to see that feature implement as a core one, what do want to have and not have ? 

---

Well, I'm curious :

  • what do you think about these topics ?
  • are there other related topics you want to add ?
  • how would you like to improve this ?
  • how did you solve that issues by the past ?
  • what are your needs ?
  • what would be the common needs when it comes to extend the default API behaviors?
  • what's currently being revamped in the new API ?

What I have done so far on the project I'm currently working on :

  • create a PHP class MyeZUser which stores itself in a session variable
  • create a login_handler which authenticates a user through a web service and creates a MyeZUser (and then stores it in the session)
  • create a datatype which basically retrieve the current MyeZUser object so that I have access to my custom user stuffs in templates over a $current_user object => my opinion is that this is not a clean solution and I'd really like to avoid using a datatype
  • add a really dirty hack so that I remove the MyeZUser from the session if i'm an anonymous user 

Thanks,
Arnaud

Modified on Wednesday 22 February 2012 1:10:01 pm by Arnaud Lafon

No reply yet!

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from