title: How to Pass User's Email Address from NHibernate and Windsor to MVC3 View?
body: <p>I'm working on a NHibernate, Castle Windsor and MVC3 project.  I need to pass the view the currently logged in user's email address.  The custom membership provider is in the namespace.CustomProviders.WebWindsorMembershipProvider.  How do I pass the email address to my Razor view?</p>
  
  <p>Our Custom membership provider defines usr.Email as part of this:</p>
  
  <pre><code>private MembershipUser GetMembershipUserFromUser(User usr)
      {
          MembershipUser u = new MembershipUser("WebWindsorMembershipProvider",
                                                usr.Username,
                                                usr.Id,
                                                usr.Email,
                                                usr.SecretQuestion,
                                                usr.SecretAnswer,
                                                usr.IsApproved,
                                                usr.IsLockedOut,
                                                (usr.CreationDate.HasValue) ? usr.CreationDate.Value : DateTime.Now,
                                                (usr.LastLoginDate.HasValue)
                                                    ? usr.LastLoginDate.Value
                                                    : Utils.MinDate(),
                                                (usr.LastActivityDate.HasValue)
                                                    ? usr.LastActivityDate.Value
                                                    : Utils.MinDate(),
                                                (usr.LastPasswordChangedDate.HasValue)
                                                    ? usr.LastPasswordChangedDate.Value
                                                    : Utils.MinDate(),
                                                (usr.LastLockedOutDate.HasValue)
                                                    ? usr.LastLockedOutDate.Value
                                                    : Utils.MinDate()); 
  
          return u;
      }
  </code></pre>
  
  <p>How do I pass the usr.Email value from the custom provider to embed into a H2 tag in my AccountInfo view?</p>