jueves, 10 de octubre de 2013

Fixing “User Not Found” Error in SharePoint 2007 - MOSS

Sometimes you may receive “User not found” error with sharepoint pages when you try to access/edit page properties/settings in pages library or in content and stucture view (or from the ‘Page’ dropdown on the page editing toolbar).
The solution I found the best was to fix the user from the database directly (my apologies for being so blunt but this was the best that I could come up with :) )……cudent find any other solutions…….and this solution works really fine. No issues at all. 
When an active directory account is changed, SharePoint seems to hold on to the old account details. SharePoint has a separate table to manage user information named as “UserInfo” table.  That’s why, updating in ActiveDirectory user’s information won’t be reflected in SharePoint. Un-registering a user from SharePoint could be an option, but SharePoint will not delete user information but will only inactivate it. SharePoint does this for consistency within the database.
To resolve the problem, set tp_Deleted to 0 (zero) and tp_IsActive to 1.
Get the ID of the troubled user. To do that, go to ‘People and Groups’ and locate the user in the list. Put the mouse cursor on the user name…..just above the task bar on the left bottom of the screen, you will see the full URL with an ID appended at the end….note the ID. This is the ID of the user in the database.
Go to SQL query analyzer, select appropriate database and run the query:
Select SiteId from webs where author = <UserID>
Example:Select SiteId from webs where author = 12         
You will get the GUID for the site that this user has created. Copy this and run the following command:
SELECT * FROM UserInfo WHERE tp_SiteID = ‘<GUID>’ AND   tp_ID = <User ID>         
Example:SELECT * FROM UserInfo WHERE tp_SiteID = ‘E8379222-4598-407C-BF30-EAA0C278A2AF’  AND  tp_ID = 12
View the results of the query, if  tp_Deleted = 1 you should set it to 0 (zero) with an UPDATE command:
UPDATE UserInfo SET tp_Deleted = 0 where  tp_Id = <UserID> AND tp_SiteID = <GUID>
Example:UPDATE UserInfo SET tp_Deleted = 0 where tp_Id = 12 AND  tp_SiteID = ‘E8379222-4598-407C-BF30-EAA0C278A2AF’
Remember, at the end of the day, tp_Deleted should be set to 0 (zero) and tp_IsActive as 1.
———————————————————OR try this————————————————————————
1) Open SQL Server 2005 Management Studio and connect to the database using the command:
Use <database_name>
2) Create a new query and run the following SQL statement:
Update UserInfo Set tp_Deleted = 0   
WHERE  tp_ID  IN
(select tp_ID from UserInfo where tp_deleted <> 0 AND
(UserInfo.tp_ID in (select author from webs) OR
UserInfo.tp_ID in (select tp_Author from AllUserData)))
AND tp_login <> ‘<domain name>\<user name>’
Update UserInfo Set tp_IsActive = 1
WHERE  tp_ID IN
(select tp_ID from UserInfo where tp_IsActive = 0 AND
(UserInfo.tp_ID in (select author from webs) OR
UserInfo.tp_ID in (select tp_Author from AllUserData)))
AND tp_login <> ‘<domain name>\<user name>’
3) Restart IIS
 Hope this works for you……

No hay comentarios:

Publicar un comentario