TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
How to get the current logged in username in SharePoint 2013
Gowtham Rajamanickam
Apr 03
2015
Code
2.2
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
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