Hello,
First, Thanks for this usefull post but i get stuck using my main Yaf Forum inside DNN after installation;
I did all the first parts : - backed up my existing yaf tables (deathblow.bak) from sql server management studio
- restored it on a fresh 'deathblow' db from sql server management studio
- delete all folders and files of yaf,
- replaced them with new dnn.
- executed the dnn installation on deathblow db
- created new users while dnn installation (hostadmin and siteadmin)
- installed the yaf dnn module.
- added a forum page in dnn
- installed yaf module on this page (at this point, yaf wizard asking for web.config yaf password, etc...) --> completed
- executed without any errors the script to import users inside dnn tables (changed script to point on 'deathblow' db) from sql server management studio
- opened dnn forum page while logged at hostadmin
At this point, there is a logout and i get the following yaf error :
Quote:Error
A system error happened. Thanks to contact administrator.
Continue Link...
After it oppen the forum with correct topics and forums inside but unlogged at this point.
Then, I try to log back hostadmin account and go back on forum and getting same error.
Also, when i try to reset the password of an imported user i get this error too :
Quote:There was an error retrieving your password. No password was sent.
Here's the script detail :
Quote:
begin tran
DECLARE @ApplicationId uniqueidentifier
--Get DNN .NET Membership ApplicationID
SELECT @ApplicationId = ApplicationId
FROM [DeathBlow].[dbo].[aspnet_Applications]
INSERT [DeathBlow].[dbo].[aspnet_Users] (ApplicationId,UserId,UserName,LoweredUserName,IsAnonymous,LastActivityDate)
SELECT @ApplicationId, m.Userid, m.Username, m.UsernameLwd,0,
CASE
WHEN m.LastActivity IS NULL THEN getdate()
ELSE m.LastActivity
END
from [DeathBlow].dbo.yaf_prov_Membership m
Left JOIN [DeathBlow].[dbo].[aspnet_Membership] mm on m.UserID = mm.UserID
Where mm.UserID IS NULL
--INSERT into DNN .NET Membership Membership table the required Information
--from yaf membership
INSERT [DeathBlow].[dbo].[aspnet_Membership] (ApplicationId,UserId,[Password],PasswordFormat,PasswordSalt,Email,LoweredEmail,PasswordQuestion,PasswordAnswer,IsApproved,IsLockedOut,LastLoginDate,LastPasswordChangedDate,LastLockoutDate,FailedPasswordAttemptCount,FailedPasswordAttemptWindowStart,FailedPasswordAnswerAttemptCount,FailedPasswordAnswerAttemptWindowStart,Comment,CreateDate)
SELECT @ApplicationId,m.UserID,m.[Password],m.PasswordFormat,m.PasswordSalt,m.Email,m.EmailLwd,m.PasswordQuestion,m.PasswordAnswer,m.IsApproved,0,
CASE
WHEN m.LastLogin IS NULL THEN '1754-01-01 00:00:00.000'
ELSE m.LastLogin
END,
CASE
WHEN m.LastPasswordChange IS NULL THEN '1754-01-01 00:00:00.000'
ELSE m.LastPasswordChange
END,
CASE
WHEN m.LastLockOut IS NULL THEN '1754-01-01 00:00:00.000'
ELSE m.LastLockOut
END,0,'1754-01-01 00:00:00.000',0,'1754-01-01 00:00:00.000',m.Comment,m.Joined
FROM [DeathBlow].[dbo].[yaf_prov_membership] m
Left JOIN [DeathBlow].[dbo].[aspnet_Membership] mm on m.UserID = mm.UserID
Where mm.UserID IS NULL
INSERT [DeathBlow].[dbo].[Users] ([Username],[FirstName],[LastName] ,[IsSuperUser],[Email],[DisplayName] ,[IsDeleted],[CreatedByUserID],[CreatedOnDate],[LastModifiedByUserID],[LastModifiedOnDate],[UpdatePassword])
SELECT u.Name,u.Name,'',0,u.Email,u.DisplayName,0,-1,u.Joined,-1,LastVisit, 1
FROM [DeathBlow].[dbo].[yaf_User] u
JOIN [DeathBlow].[dbo].[yaf_prov_membership] m on m.UserID = u.ProviderUserKey
LEFT JOIN [DeathBlow].[dbo].[Users] uu on m.username = uu.username
WHERE uu.UserID IS NULL
INSERT [DeathBlow].[dbo].[UserPortals] (UserId,PortalId,CreatedDate,Authorised)
SELECT u.Userid,0,u.[CreatedOnDate],1
FROM [DeathBlow].[dbo].[Users] u
LEFT JOIN [DeathBlow].[dbo].[UserPortals] up on u.userid = up.userid
where u.UserID != 1
AND up.userid is null
INSERT [DeathBlow].[dbo].[UserRoles] (UserID,RoleID,IsTrialUsed,CreatedByUserID,CreatedOnDate,LastModifiedByUserID,LastModifiedOnDate)
SELECT u.UserID, 1, 1, -1,u.CreatedOnDate,-1,u.LastModifiedOnDate
FROM [DeathBlow].[dbo].[Users] u
LEFT JOIN [DeathBlow].[dbo].[UserRoles] ur ON u.UserID = ur.UserID
AND ur.ROLEID = 1
WHERE u.UserID != 1
AND ur.UserID IS NULL
INSERT [DeathBlow].[dbo].[UserRoles] (UserID,RoleID,IsTrialUsed,CreatedByUserID,CreatedOnDate,LastModifiedByUserID,LastModifiedOnDate)
SELECT u.UserID, 2, 1, -1,u.CreatedOnDate,-1,u.LastModifiedOnDate
FROM [DeathBlow].[dbo].[Users] u
LEFT JOIN [DeathBlow].[dbo].[UserRoles] ur ON u.UserID = ur.UserID
AND ur.ROLEID = 2
WHERE u.UserID != 1
AND ur.UserID IS NULL
Commit
Using DNN 05.06.01 and YAF_DNN5_1.95.5-4750
Thanks for help.
Suggestion : Once done, maybe it could be great to add the feature inside Yaf DNN Module (possibility to import users and forum content).