Hi peeps,
In this post we are going to write a script which will give us the current user loggedin name for a sharepoint site using jQuery SPServices.
Below is the script:
// add the ref of jQuery file
<script type="text/javascript" src="/style library/jquery-1.7.2.js"></script>
// add the ref of jQuery SPServices file
<script type="text/javascript" src="/style library/jquery.SPServices-0.7.0.min.js"></script>
<script type="text/javascript">
var currentuserName = $().SPServices.SPGetCurrentUser({
fieldName: "Title",
debug: false
});
</script>
Hope this helps...
RELATED Post : How to display user information using ProfilePropertyLoader in sharepoint
In this post we are going to write a script which will give us the current user loggedin name for a sharepoint site using jQuery SPServices.
Below is the script:
// add the ref of jQuery file
<script type="text/javascript" src="/style library/jquery-1.7.2.js"></script>
// add the ref of jQuery SPServices file
<script type="text/javascript" src="/style library/jquery.SPServices-0.7.0.min.js"></script>
<script type="text/javascript">
var currentuserName = $().SPServices.SPGetCurrentUser({
fieldName: "Title",
debug: false
});
</script>
Hope this helps...
RELATED Post : How to display user information using ProfilePropertyLoader in sharepoint