locked
JavaScript: Find Currently Logged in User Name RRS feed

  • Question

  • How to get Current logged in Usr Name (on Sharepoint Site) through javascript.
    Tuesday, May 25, 2010 4:28 AM

All replies

  • "Being ME" ha scritto nel messaggio
    news:655af99f-6101-4d74-8274-02b31cdedd23@communitybridge.codeplex.com...
    How to get Current logged in Usr Name (on Sharepoint Site) through
    javascript.
     
     
    Hi Being ME,
     
    download SPServices jQuery library from Codeplex
    (http://spservices.codeplex.com/) and use this simple jquery code:
     
    <script type="text/javascript" language="javascript"
    src="/jQueryLibraries/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" language="javascript"
    src="/jQueryLibraries/jquery.SPServices-0.4.5.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
    var thisUser = $().SPServices.SPGetCurrentUser();
    alert(thisUser);
    });
    </script>
     
     

    Pat (Microsoft Office Project MVP) -- http://patitaly0.spaces.live.com

    Se questa risposta ti ha aiutato clicca su "Segna come Risposta"

    Sunday, May 30, 2010 3:29 PM