SP.Web.ensureUser(logonName) Method

Applies to: SharePoint Foundation 2010

In this article
Return Value
Remarks
Applies To

Adds the user with the specified login name to the website.

var value = SP.Web.ensureUser(logonName);

Parameters

logonName

Type: string

The login name of the user.

Return Value

Type: SP.User

The user with the specified login name.

Remarks

This method does not add a user with the specified login name to the website if that user is already on the website.

Applies To

SP.Web Class

See Also

Reference

SP.Web Methods

SP.Web Properties

SP Namespace