ruby-on-railsredmineredmine-plugins

How can I get Current User Email in Redmine?


I created plug in for Redmine using Ruby On Rails. In index.html.erb [View] I want information related logged in person .

<h2>ResourcemanagController#index</h2>

<%= User.current.name %>
<%= User.current.id %>
<% if User.current.admin? %>
Admin
<% end %>

Using above code I am able to get User name , But I want email address of Current User. What to do ?


Solution

  • <%= User.current.login %>
    

    Using Above Code We can get Email Address of Logged In Person in Redmine.