SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to add current logged userid in link of quick launch bar, with sharepoint designer 2007

share|improve this question

Use SPServices Jquery from CodePlex, wherein adding

var thisUserName = $().SPServices.SPGetCurrentUser({
    fieldName: "ID",
    debug: false

would get you the userid.

Check the documentation on how this can be done.

share|improve this answer
it is not working for me :( – RHM Jun 8 '12 at 9:04

There are no out of the box ways to do this. You can probably use the welcome user control (modified just for showing the username) in the default.master and modify this master-page to add the control near the quick launch content placeholder.

share|improve this answer
welcome user control is showing the username but i want the userid – RHM Jun 8 '12 at 7:52

You can get the current logged un user id out of the box. If you view source on any sharepoint page you should be able to see a Javascript object literal _spPageContextInfo

var _spPageContextInfo = { ..omited-code.. **userId:1**, ..omited-code...};

if you want to get that variable its as easy as

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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