1

Im trying to get the logged in users username and email adress to display in a view is that possible?

6

Yes. Just create a view with base table of (user). Then add your fields of username and email. Then add a contextual fileter of uid and set a default value for logged in user.

  • But if I have a view that is content based(as base table) and I need the username to construct a custom URL. I thought this would be very easy but it gets more complicating all the time. – sand May 13 '13 at 12:52
  • Sorry I am confused. Are you saying you have another view and you also want to attach the username a d email of the current user to it? If so then you are going to have to create two different views and attach one to the other. You are going to have to provide more info about your setup instead of leaving us to guess based on the limited info you provided. Based in your question I took it as you just needed a single view that shows the current users info. – Nigel Waters May 13 '13 at 15:39
  • Sorry if I was unclear with the question. I have a content type that is a "organic group" group content. – sand May 15 '13 at 20:26
  • Sorry if I was unclear with the question. I have a content type that is a "organic group" group content. called "post" That content type is attached to an organic group. called team. Than i want to create a view that lists all posts that belong to a organic group. Until now everything is fine. Now i need the logged in users username and create a custom url like hipphopp.com/q="the logged in users name". But I cant get the logged in users username.... That field is not available in the field. – sand May 15 '13 at 20:32
  • You won't find that field, because you are using (content) as your base table. These will need to be separate views. – Nigel Waters May 15 '13 at 22:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.