Redmine username

I want to get the current username. As described in the documentation, I have to use the User.name method. I tried to use it, as in the example - it did not work. Tried this:

val = User.current.name

And this:

user = User.find(User.current.id)
val = user.name


What am I doing wrong?

+3
source share
2 answers

If you are not doing something strange with your Redmine instance, you should always have one User.current. Therefore, you can also use User.current.name.

Since this did not work, as you said, could you tell us in detail what exactly did not work?

+1
source

cookie (. ), .

0

Source: https://habr.com/ru/post/1763496/


All Articles