Welcome to Geeklog, Anonymous Wednesday, November 27 2024 @ 10:01 pm EST

Geeklog Forums

Automated action when a user is added to a group.


Status: offline

NeoNecro

Forum User
Regular Poster
Registered: 02/07/04
Posts: 90
Hey,
I'm having some questions about plugin development (again).

So, the problem is that every user of one group has a profile (not the geeklog profile, but a new one). When a user of this group enters a page for the first time, his profile is created. This also happens when an admin opens his profiel for the first time. I think this is a rather bad way to do this. Now my question is: is there away to make this profile when a user is added to this group?

Another question I have is: is there a way to delete this profile when the user is deleted?

It would be nice if there's an easy way to do this.

Grtz
dimis-site.be
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
There are plugin API calls that are called for all user admin actions.

- create user
- delete user
- user changes there preferences
- user group changed
- user logging in
- user logging out

You can extend the user account info page with your plugins profile options as well.
Geeklog components by PortalParts -- www.portalparts.com
 Quote

Status: offline

NeoNecro

Forum User
Regular Poster
Registered: 02/07/04
Posts: 90
Ok, thank you.
Who do I use these functions? Do I put them in functions.inc and do I call them like this?
Text Formatted Code

plugin_user_create_[pluginname]($uid){code}

 


So, it are the functions that are used in lib-plugins.php?

Thank you for your help!
dimis-site.be
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Simply implement those functions (only those that you need) in your plugin's functions.inc. Geeklog will call them automatically when e.g. a new user is added.

bye, Dirk
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
Also - you may want to review the Plugin Developers Guide. It may not have all the updates for the new API's but will explain the basics of plugin development that you need to know.
Geeklog components by PortalParts -- www.portalparts.com
 Quote

Status: offline

NeoNecro

Forum User
Regular Poster
Registered: 02/07/04
Posts: 90
happy
Thank you guys Big Celebration
You're all very helpfull.

I've allready red the plugin developers guide (several times), but I didn't learn much with it. But I really found the Universal Plugin Kit very helpfull (to bad it's so old) and I learnt a lot by looking at other plugins.

I even allready made a plugin, but there was no interest for it and I stopped using it on my site. So I also stopped the develpment of it. But I'm thinking of giving it a new lifen, some day ...

grtz
dimis-site.be
 Quote

Status: offline

NeoNecro

Forum User
Regular Poster
Registered: 02/07/04
Posts: 90
I've another question:
If a user is deleted, would this just call the delete user function? Or will it call the delete user function and the group changed function?

grtz
dimis-site.be
 Quote

All times are EST. The time is now 10:01 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