Advertisement:

Author Topic: Yikes. I think I screwed up (again)  (Read 1874 times)

Offline wakewatcher

  • Jr. Member
  • **
  • Posts: 232
Yikes. I think I screwed up (again)
« on: December 23, 2008, 01:52:30 AM »
I've been integrating smf into my home grown application.  Prior to to using smf for user authentication I had something else that was username based. So I used members.member_name to index into my applications database.  Too late (at least before I rework it) I notice that there is the ability for users to change their usernames by editing their account profile.  This will cause the expected problems in my application.  I scrambled but couldn't find any permission setting that turned off the ability to change their username. (other than during off access totally.)  Is there?  Question number 2 more importantly can I be assured that the id_member field will never change for a a user? That is there is no maintenance task that cleans up the id_member list and reorders it?  -thx-
smf 2.0.7

Offline Joey Smith™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,356
  • Gender: Male
Re: Yikes. I think I screwed up (again)
« Reply #1 on: December 23, 2008, 02:08:54 AM »
Well I am not sure if this is what you mean but if you deny the permission to edit their account settings then they should not be able to change their names (I think... Try it).

Also some mods in 1.1.7 and the core distribution of 2.x allows for the removal of inactive members. Which may not be a problem unless you recount the forum totals (not sure if that would change the member ID).

Just sharing what I know (the little it is).

Offline wakewatcher

  • Jr. Member
  • **
  • Posts: 232
Re: Yikes. I think I screwed up (again)
« Reply #2 on: December 23, 2008, 02:15:11 AM »
Thanks.  Yeah the problem is I need them to be able to update their profile but just not change their username until I get it fixed.  (I can send out news to warn them and in the long run I"ll change my application to use id_member.)  In that regard I' manually removed users and it doesn't seem to reorder the id_member number but I worry about some maintenance task doing so.
smf 2.0.7

Offline Joey Smith™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,356
  • Gender: Male
Re: Yikes. I think I screwed up (again)
« Reply #3 on: December 23, 2008, 02:17:55 AM »
Setup a test forum and then add some members and see if the recount will change the ID.

Watch this thread and someone will answer that happens to know the answer to this off the top of their heads.

Offline greyknight17

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 14,890
  • Gender: Male
    • Kevin's Resource Center
Re: Yikes. I think I screwed up (again)
« Reply #4 on: January 16, 2009, 12:34:01 AM »
If you go to Admin >  Features and Options > Options, you should see a checkbox for Allow users to edit their displayed name? Make sure that's unchecked and it should remove that option for everyone.

Regarding the member IDs, they will not be reordered. If the account is deleted, the member ID should be removed as well, but all the other IDs after it shall remain unchanged. The member ID is set to auto increment for each new member that registers. So if you are member 100, you will remain at that number.

Offline wakewatcher

  • Jr. Member
  • **
  • Posts: 232
Re: Yikes. I think I screwed up (again)
« Reply #5 on: January 16, 2009, 12:41:43 AM »
Thanks.  I ended up peaking at the db and saw the auto increment on id_member and took a chance (not knowing all there is to know about MySql) that some maintenance function wouldn't reorder them. Glad you verified that for me.
smf 2.0.7