Posted on 8/20/2010 11:17:00 PM by Levin, Aric

Servers  SharePoint  SQL 

If you are using Forms Based Authentication for you SharePoint site you might encounter the site displaying a user name such as "i:0#.f|sql-membershipprovider|username" instead of just "username".

You can modify the tp_Title field in your SQL Server UserInfo table directly, but at times the seems to be reverted back to its original value. There is a solution to this problem, however it is unsupported of course, as you are modifying a stored procedure in the SharePoint database directly.

If you are using Forms Based Authentication for you SharePoint site you might encounter the site displaying a user name such as "i:0#.f|sql-membershipprovider|username" instead of just "username".

You can modify the tp_Title field in your SQL Server UserInfo table directly, but at times the seems to be reverted back to its original value. There is a solution to this problem, however it is unsupported of course, as you are modifying a stored procedure in the SharePoint database directly.

In your SharePoint database located the proc_UpdateUserInfoInTableFromRowUpdater stored procedure.

Under the declaration section of the @OldIsActive bit field add the following code:

IF (SUBSTRING(@Title, 0,3)='i:0')

    BEGIN

        DECLARE @LastIndex int

        SET @LastIndex = (SELECT CASE CHARINDEX('|', @Title)

WHEN 0 THEN -1 ELSE LEN(@Title) - CHARINDEX('|', REVERSE(@Title))+1 END)

        SET @Title = SUBSTRING(@Title, @LastIndex, LEN(@Title)-@LastIndex)    

END

You might have to modify the first line of code based on the way the tp_Title is displayed in your database. 


Navigate to original post to enter comments