0

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

1

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.

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

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.

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

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);
| improve this answer | |

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.