just a note, acting_user is not available outside permission methods
and lifecycle transitions (IIRC those are the only places) as the
value is preset by the method actually called by the controller/view
layer.  ie create_permitted? isn't called by the controller,
creatable_by?(user) is called, which sets acting_user = user and then
calls create_permitted?

On Dec 8, 6:47 am, Joachim Bartosik <[email protected]> wrote:
> On Tue, Dec 7, 2010 at 18:58, Alan <[email protected]> wrote:
> > Could someone please instruct me on how to get the logged-in user´s id
> > (primary key for the users table)? If possible without resorting to
> > plugins. Many thanks.
>
> In views and controllers
>
>     current_user.id
>
> or in models
>
>     acting_user_id
>
> actually acting_ and current_ user may be diffrent, see
>
> http://groups.google.com/group/hobousers/browse_thread/thread/19b233e...
>
> Regards,
> Joachim

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to