YAFLogo

rmcbride@rama.com
16 years ago
Hi all

I have what I think is a simple account configuration problem, but I need a bit of help with it.

When a new user joins my website, they are put in the "Members" group at the asp membership level. When they come to the YAF forum in the subfolder of the site (working really well except for this), they can't see any forums and have not role defined. I have to manually go in and check "Registered" in their profile.

Location for setting: Root>Administration>Users>Edit User "Username"

Is there a way to tell the database that anyone in the asp membership role of "Members" should be flagged as "Registered" automatically?

Thanks

Richard

Sponsor
rmcbride@rama.com
16 years ago
Hi all

This may be a bit more of an issue than I thought. I created a role called Registered and tried creating a new user for that role. However the new user was still not flagged into that role despite the role being set as "Is Start".

This is probably something I have set incorrectly, so please let me know if you have any idea as to what I might do here.

Thanks

Richard

Mek
  • Mek
  • 100% (Exalted)
  • YAF Developer
16 years ago
The sync between the provider and yaf is not being called, most likely down to the installation to a folder in the root.

YAFInitModule needs to be called... think theres a thread about it somewhere ;-)


UserPostedImage

"It's a case of RTFM.. the only problem being we don't have a manual!"

When I post FP:Mek in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Ederon 🙂 )

Mek
  • Mek
  • 100% (Exalted)
  • YAF Developer
16 years ago

	<httpModules>
			<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
			<add name="YafInitModule" type="YAF.Classes.Base.YafInitModule, YAF.Classes.Base"/>
			<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter" />
		</httpModules>

You need to make sure the YAFInitModule is in your web.config; and probably in your root bin as well; depending on your setup.


UserPostedImage

"It's a case of RTFM.. the only problem being we don't have a manual!"

When I post FP:Mek in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Ederon 🙂 )

rmcbride@rama.com
16 years ago
Hi Mek

Moved the line to the root web.config but that did not seem to do anything. I have yaf.classes.base.dll in the root bin along with all the other yaf dlls.

By the way, I inadvertently move the line too, and boy did that screw things up. Oops!

I will keep taking advice on this. We are making progress.

Thanks

Richard

Mek
  • Mek
  • 100% (Exalted)
  • YAF Developer
16 years ago
Ooh i have this also


	<system.webServer>
		<validation validateIntegratedModeConfiguration="false"/>
		<modules>
			<remove name="ScriptModule" />
			<remove name="YafInitModule" />
			<remove name="UrlRewriter" />
			<add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
			<add name="YafInitModule" type="YAF.Classes.Base.YafInitModule, YAF.Classes.Base"/>
			<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter" preCondition="managedHandler" />
		</modules>

Another place its mentioned; YafInitModule is definately your trouble; you just need to get your web.config right :-)


UserPostedImage

"It's a case of RTFM.. the only problem being we don't have a manual!"

When I post FP:Mek in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Ederon 🙂 )

rmcbride@rama.com
16 years ago
Hi Mek

I moved the line from the yaf web.config to the root web.config.

Still no joy.

We can figure this out. We just gotta keep hacking away. Once we get it working I will play with things to find out what is "really" necessary for a subdirectory install and add it to my document.

Thanks

Richard

PS. In the interests of process isolation, I am not touching anything else (urlrewriting, etc). If this approach is incorrect, please tell me.

Mek
  • Mek
  • 100% (Exalted)
  • YAF Developer
16 years ago
Wait a min! Re-reading.

The "Members" role is listed in the YAF_groups list?


UserPostedImage

"It's a case of RTFM.. the only problem being we don't have a manual!"

When I post FP:Mek in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Ederon 🙂 )

rmcbride@rama.com
16 years ago
Hi Mek

Where would I find the YAF_groups list?

Thanks

Richard

rmcbride@rama.com
16 years ago
Hi Mek

Just because I am too impatient to wait for an answer, I checked the database table of Yaf_Group. Here is the result set.

GroupID BoardID Name Flags

1 1 Administrators 1

2 1 Guests 2

4 1 Members 4

5 1 Registered 4

Mek
  • Mek
  • 100% (Exalted)
  • YAF Developer
16 years ago
:-)

Ok members is there; and I guess registered is your start group.

Edit a forum you've create, set Members a readonly mask on a forum. logout and in as one of your test users and see if there is anything they can see.


UserPostedImage

"It's a case of RTFM.. the only problem being we don't have a manual!"

When I post FP:Mek in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Ederon 🙂 )

rmcbride@rama.com
16 years ago
Hi Mek

I tried something else just now. Instead of creating the user outside the forum as I would normally do, I use the YAF interface to create the user.

Voila. The user is setup properly and can see the forums.

I am not sure where to go with this, but I now know that YAF can register users on my application, but YAF is not setting the "Is Start" role for users created within the base application.

I will try your other test now.

Thanks

Richard

rmcbride@rama.com
16 years ago
Hi Mek

1. Created a forum called User Test.

2. Registered a new user for the application at the root level (not in YAF).

3. Logged on as new user. No roles assigned. No folders visible.

4. Logged in using functional user account. User Test is visible but not postable. Test forum is visible and postable.

Thanks

Richard

Mek
  • Mek
  • 100% (Exalted)
  • YAF Developer
16 years ago
Okies definately definately looking like a sync issue to me.

When you create a new user (not in yaf) are you doing so through your own code i.e. Membership.CreateUser() or through the crappy asp.net membership management thing?


UserPostedImage

"It's a case of RTFM.. the only problem being we don't have a manual!"

When I post FP:Mek in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Ederon 🙂 )

rmcbride@rama.com
16 years ago
hi Mek

I use a login page that uses the asp:CreateUserWizard control. This is essentially same thing the asp membership management interface uses. I suspect you will find this to be true of many future script-kiddies like me.

Here is the code. It's frighteningly simplistic, but then again I am a fan of simple.

ID="CreateUserWizard1"

runat="server"

ContinueDestinationPageUrl="~/Default.aspx"

MembershipProvider="Gunk" BackColor="#EFF3FB"

BorderColor="#B5C7DE" BorderStyle="Solid" BorderWidth="1px"

Font-Names="Verdana" Font-Size="0.8em">

ForeColor="White" />

BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana"

ForeColor="#284E98" />

BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana"

ForeColor="#284E98" />

BorderWidth="2px" Font-Bold="True" Font-Size="0.9em" ForeColor="White"

HorizontalAlign="Center" />

BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana"

ForeColor="#284E98" />

ID="CreateUserWizardStep1" runat="server">

ID="CompleteWizardStep1" runat="server">

Thanks

Richard