YAFLogo

rian.weaver@earthsoft.com
12 years ago
We migrated an older Yaf (1.8 i think) to 1.9.5 RC1 on a new machine (using the web installer).

The existing accounts seem to be working (once we changed the salting and hashing), but now, user registration is not working.

Some people have issues with the CAPTCHA (but I think that might be user error).

More concerning is that when using a user name AND email address that is NOT in the database at all, users get an error that the username or email is already in use.

Is there somewhere besides yaf_User that they may be stored temporarily? Would it be better to remove the email verification (would that help?)

Is there a temporary table that the unverified users are stored in that I can clear out? A Cache, so to speak?

Thanks

Sponsor
rian.weaver@earthsoft.com
12 years ago
As an update - I turned off require user verification, and started a wholly new registration process. I went through, and "Created" a user, but where I should have gotten an confirmation, I got:

Failure

There's been a system error processing your request. Please contact the forum admin explaining what you were doing when it happened.

Continue...

As an admin, I got an email that the users was registered:

Hello!

A new user has registered on the EarthSoft Community Center forum:

User Name: totallyuniqueuser

User Email: r.i.a.n.weaver@gmail.com

http://community.earthsoft.com/default.aspx?g=admin_admin 

However, the user still does not show up in the database anywhere that I can see it.

Any thoughts / ideas?

rian.weaver@earthsoft.com
12 years ago
Okay, I found that these users are being inserted into yaf_prov_Membership, just not yaf_User.

I'm also seeing some other issues in yaf_EventLog

ASP.default_aspx

System.Data.SqlClient.SqlException (0x80131904): The INSERT statement conflicted with the FOREIGN KEY constraint "FK_yaf_CheckEmail_yaf_User". The conflict occurred in database "YAForum", table "dbo.yaf_User", column 'UserID'. The statement has been terminated.

System.String

System.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column 'UserID', table 'YAForum.dbo.yaf_UserGroup'; column does not allow nulls. INSERT fails. The statement has been terminated.

user_aspnet in YAF.Classes.Data.DB.cs

System.Data.SqlClient.SqlException (0x80131904): profile name is not valid

toregua
  • toregua
  • 50.6% (Neutral)
  • YAF Camper
11 years ago
I have exactly the same problem :(

I have debug the code and I have error when

public static void checkemail_save([NotNull] object userID, [NotNull] object hash, [NotNull] object email)

{

using (var cmd = MsSqlDbAccess.GetCommand("checkemail_save"))

{

cmd.CommandType = CommandType.StoredProcedure;

cmd.Parameters.AddWithValue("UserID", userID);

cmd.Parameters.AddWithValue("Hash", hash);

cmd.Parameters.AddWithValue("Email", email);

cmd.Parameters.AddWithValue("UTCTIMESTAMP", DateTime.UtcNow);

MsSqlDbAccess.Current.ExecuteNonQuery(cmd);

}

}

ExecuteNonQuery call checkemail_save with userID = 0.

In my Web.config I have :

Is there any issues ?

toregua
  • toregua
  • 50.6% (Neutral)
  • YAF Camper
11 years ago
Continuing to debug I have found that ForumUser is not created. Coming with an exception when calling :

        public static int user_aspnet(
          int boardID, [NotNull] string userName, [NotNull] string displayName, [NotNull] string email, [NotNull] object providerUserKey, [NotNull] object isApproved)
        {
            try
            {
                using (var cmd = MsSqlDbAccess.GetCommand("user_aspnet"))
                {
                    cmd.CommandType = CommandType.StoredProcedure;

                    cmd.Parameters.AddWithValue("BoardID", boardID);
                    cmd.Parameters.AddWithValue("UserName", userName);
                    cmd.Parameters.AddWithValue("DisplayName", displayName);
                    cmd.Parameters.AddWithValue("Email", email);
                    cmd.Parameters.AddWithValue("ProviderUserKey", providerUserKey);
                    cmd.Parameters.AddWithValue("IsApproved", isApproved);
                    cmd.Parameters.AddWithValue("UTCTIMESTAMP", DateTime.UtcNow);
                    return (int)MsSqlDbAccess.Current.ExecuteScalar(cmd);
                }
            }
            catch (Exception x)
            {
                eventlog_create(null, "user_aspnet in YAF.Classes.Data.DB.cs", x, EventLogTypes.Error);
                return 0;
            }
        }

toregua
  • toregua
  • 50.6% (Neutral)
  • YAF Camper
11 years ago
OK I have found my problem :D

SELECT * 
FROM [dbo].[yaf_Registry] 
WHERE LOWER([Name]) = LOWER('TimeZone')

This query return two results for me.

I have just delete the result which have BoardId = NULL

I found this debugging the Tr-SQL stored procedure : yaf_user_aspnet

Hope its help