Commit 1910a1d6e1e66286692906c0e909b7aba722eb19

Authored by Braulio Bhavamitra
1 parent 53ccf362

Send profile data on user data

app/models/user.rb
... ... @@ -320,6 +320,8 @@ class User < ActiveRecord::Base
320 320  
321 321 {
322 322 'login' => self.login,
  323 + 'name' => self.person.name,
  324 + 'email' => self.email,
323 325 'avatar' => self.person.profile_custom_icon(gravatar_default),
324 326 'is_admin' => self.person.is_admin?,
325 327 'since_month' => self.person.created_at.month,
... ...
app/views/layouts/application-ng.html.erb
... ... @@ -27,6 +27,7 @@
27 27  
28 28 <script type="text/javascript">
29 29 DEFAULT_LOADING_MESSAGE = <%="'#{ _('loading...') }'" %>;
  30 + noosfero.profile = <%= (@profile.identifier if @profile).to_json %>
30 31 </script>
31 32  
32 33 </head>
... ...