Welcome to Geeklog, Anonymous Wednesday, February 01 2023 @ 06:22 pm EST

Geeklog Forums

plugiin_user_changed_ call timing


Status: offline

caltman

Forum User
Junior
Registered: 07/12/04
Posts: 25
Long story short:

GL calls the plugin_user_changed_{plugin}(uid) function after if has updated all of the information. If a plugin needs to make a change based on 'username' for example and does not have 'uid' in its database tables, it has no way of knowing what the old username was. I think this function should pass an array with the old information.


Short story long:

I have been working on a crude integration of phpMychat and geeklog for my site. It basically adds Geeklog registered users to the phpMychat registered users tables. I did not make any changes to the DB schema for phpMychat. I just grab 'username' from TABLES['users'] based on the users uid and pass it over to phpMychat.

When a new user is created I add them to the chat tables. When a user is deleted I delete them from the chat tables. all of the sql queries associated with the chat plugin are based on 'username'.

The only thing I can't handle at this time is if a user changes their username in GL. I can't get the old username out of phpMychat tables because GL doesn't call the plugin_user_changed_{plugin} function until after if has updated all of the information including the username.

It's not a show stopper right now but I thought someone might like to know.

Regards,
Carter.
 Quote

All times are EST. The time is now 06:22 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content