stormpath / stormpath-laravel

Build simple, secure web applications with Stormpath and Laravel
Other
29 stars 6 forks source link

Get user_id #68

Closed yawuar closed 7 years ago

yawuar commented 7 years ago

Hi!

Is it possible to get the users id? I tried with the app function | app('stormpath.user')->id | but without succes.

Does anyone know how to do this?

Thanks!

bretterer commented 7 years ago

Hi @yawuar,

Can you try app('stormpath.user')->getId()

yawuar commented 7 years ago

No, that doesn't work.

bretterer commented 7 years ago

I'm sorry, This call is actually ->href as that is what is used for ID. We never implemented an ID method as an alias for the user.

yawuar commented 7 years ago

@bretterer

Awesome, it works!

Thanks!

bretterer commented 7 years ago

Glad to hear it!