YAFLogo

pz_asif
  • pz_asif
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
14 years ago
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
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
14 years ago
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
pz_asif
  • pz_asif
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
14 years ago
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
14 years ago
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().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
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
14 years ago
Yes it is the correct way, and it will be fixed in 1.9.5.6
bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
14 years ago

this.Get().Raise(new UpdateUserEvent(this.CurrentUserID));

LegacyDb.activeaccess_reset ( );

this.BindData();

Thanks

Originally Posted by: pz_asif 

It's a good idea. Just swap it like this

LegacyDb.activeaccess_reset ( );

this.Get().Raise(new UpdateUserEvent(this.CurrentUserID));

this.BindData();

Dennis Hevener
14 years ago
The code change worked for me. Thanks,