Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

share|improve this question
add comment

3 Answers 3

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
add comment

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
add comment

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

alert(_spPageContextInfo.userId);
share|improve this answer
add comment

Your Answer

 
discard

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.