I finnaly get somewhere, users now will be added in de user table, but still not in "prov_membership"
I sql I had to alter the storedprocudure User_save
USE [RIBW]
GO
/****** Object: StoredProcedure [dbo].[RIBWU_yaf_user_save] Script Date: 06/18/2009 14:06:35 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[RIBWU_yaf_user_save](
@UserID int,
@BoardID int,
@UserName nvarchar(50) = null,
@Password nvarchar(50) = null,
@Email nvarchar(50) = null,
@TimeZone int,
@LanguageFile nvarchar(50) = null,
@ThemeFile nvarchar(50) = null,
@OverrideDefaultTheme bit = null,
@Approved bit = null,
@PMNotification bit = null,
@ProviderUserKey nvarchar(64) = null,
@Hash nvarchar(64) = null,
@Location nvarchar(64) = null,
@HomePage nvarchar(64) = null
)
AS
begin
declare @RankID int
declare @Flags int
set @Flags = 0
if @Approved<>0 set @Flags = @Flags | 2
if @PMNotification is null SET @PMNotification = 1
if @OverrideDefaultTheme is null SET @OverrideDefaultTheme=0
if @UserID is null or @UserID<1 begin
if @Email = '' set @Email = null
select @RankID = RankID from [dbo].[RIBWU_yaf_Rank] where (Flags & 1)<>0 and BoardID=@BoardID
insert into [dbo].[RIBWU_yaf_User](BoardID,RankID,Name,Password,Email,Joined,LastVisit,NumPosts,TimeZone,Flags,PMNotification,ProviderUserKey)
values(@BoardID,@RankID,@UserName,'-',@Email,getdate(),getdate(),0,@TimeZone,@Flags,@PMNotification,@ProviderUserKey)
set @UserID = SCOPE_IDENTITY()
insert into [dbo].[RIBWU_yaf_UserGroup](UserID,GroupID) select @UserID,GroupID from [dbo].[RIBWU_yaf_Group] where BoardID=@BoardID and (Flags & 4)<>0
end
else begin
update [dbo].[RIBWU_yaf_User] set
TimeZone = @TimeZone,
LanguageFile = @LanguageFile,
ThemeFile = @ThemeFile,
OverrideDefaultThemes = @OverrideDefaultTheme,
PMNotification = @PMNotification
where UserID = @UserID
if @Email is not null
update [dbo].[RIBWU_yaf_User] set Email = @Email where UserID = @UserID
end
end
and in my login source I chaged user_registration because the order of the parameters is changed a little
Dim YafPassword As String = FormsAuthentication.HashPasswordForStoringInConfigFile(paswoord, "md5")
Dim YafUserID As Object = yaf.Classes.Data.DB.user_login(1, login, YafPassword)
If YafUserID Is DBNull.Value Then
Dim AdminPage As New YAF.Classes.Base.AdminPage
'YafUserID = yaf.Classes.Data.DB.user_register(AdminPage, 1, Login, YafPassword, Membership.GetUser(Login).Email, "", "", "-300", False)
'YafUserID = yaf.Classes.Data.DB.user_register(AdminPage, 1, Login, YafPassword, email, "", "", "-300", False)
YafUserID = yaf.Classes.Data.DB.user_register(1, Login, paswoord, "", email, "", "", "60", True)
End If
Dim idName As String = String.Format("{0};{1};{2}", YafUserID, 1, Login)
Httpcontext.Current.Session.Add("YAFUserId", idName)
I will work on this,
If I have some result I will tell
Edit : "RIBWU_yaf_" in my sp is my prefix, you should replace this
Edited by user
15 years ago |
Reason: Not specified