Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
How to get the current logged in username in SharePoint 2013
WhatsApp
Gowtham Rajamanickam
Apr 03
2015
2.3
k
0
0
Steps
Create page in your sharepoint site.
Edit the page and add a content editor webpart in sharepoint your page.
Copy hte below scitp in notepad and save it as a .js file in your site asset.
copy hte path of your notepad and paste it in a CEWP edit webpart link.
save the page .
out put will be displayed in alert box.
<
script
type
=
"text/javascript"
src
=
"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"
>
</
script
>
<
script
type
=
"text/javascript"
>
var thisUserAccount ;
$(document).ready(function() {
thisUserAccount
= $().SPServices.SPGetCurrentUser({
fieldName: "Title",
debug: false
});
alert(thisUserAccount);
});
</
script
>
Thanks for learning.
Current Logged User
Logged in user name
Logged in user email
SharePoint
Up Next
How to get the current logged in username in SharePoint 2013