pz_asif
  •  pz_asif
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
2011-06-20T14:18:54Z
Hi all,

First part of this relates to the basic install of YAF. On a fresh install of YAF i noticed that there was no Moderator role defined .... is this correct? Assuming so i have gone ahead and created one which mirrors the Registered role, apart from having the Is Moderator value set to true.

I can now go and assign a user the Moderator role for a forum. However after saving the user nothing changes ... ie the user does not get the Moderate link. If i go and save the forum the user will then get the link .... the opposite also happens, ie if i remove the moderator role from a user then the Moderate link appears until i go ahead and save the actual forum .... is this behaviour correct? it seems a bit starnge having to save the Forum to update the users access.

I am a bit puzzled by this and am unsure if i have set up the moderation correctly.

Help is much appreciated.
Thanks
Sponsor
tha_watcha
2011-06-20T14:35:06Z
Its a Bug in the current Release, the Cache is Not voräße After a Role Change. After you change the Role go to Host Settings > Cache > and click the Clear Cache Button
UserPostedImage
pz_asif
  •  pz_asif
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
2011-06-20T14:40:56Z
Thanks for you tip. Unfortunately it didnt work ... the only thing that seems to update the role is saving the forum
pz_asif
  •  pz_asif
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
2011-06-20T17:03:52Z
Having done a bit more searching through the code i have found the EditUsersGroups.ascs.cs file where the user groups get saved/updated. Looking at the code for the editforum.ascx.cs i found the code

LegacyDb.activeaccess_reset ( );

I have inserted this as below at the end of the Save_Click in EditUsersGroups.ascs.cs

this.Get<IRaiseEvent>().Raise(new UpdateUserEvent(this.CurrentUserID));
LegacyDb.activeaccess_reset ( );
this.BindData();

This seems to eb working, however i am not sure if there are any consequences of doing this, can someone please let me know if this is the correct way of doing it, or if this is a really bad idea.

Thanks
tha_watcha
2011-06-21T09:47:32Z
Yes it is the correct way, and it will be fixed in 1.9.5.6
UserPostedImage
bbobb
  •  bbobb
  • 100% (Exalted)
  • YAF Developer
2011-06-21T10:13:31Z
Originally Posted by: pz_asif 


this.Get<IRaiseEvent>().Raise(new UpdateUserEvent(this.CurrentUserID));
LegacyDb.activeaccess_reset ( );
this.BindData();
Thanks


It's a good idea. Just swap it like this
LegacyDb.activeaccess_reset ( );
this.Get<IRaiseEvent>().Raise(new UpdateUserEvent(this.CurrentUserID));
this.BindData();
Dennis Hevener
2011-07-07T23:52:24Z
The code change worked for me. Thanks,
Users browsing this topic

    About Us

    The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

    Powered by Resharper Donate with PayPal button

    Project Twitter Updates

    Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved