[PHP] core.user_activate

Request hook events and what data needs to be sent for the new hook system.
Post Reply
Tomba
Registered User
Posts: 13
Joined: Sat Apr 12, 2003 1:59 pm

[PHP] core.user_activate

Post by Tomba » Sat Nov 16, 2013 1:56 pm

Name: core.user_activate
Rationale: Similar to the user_add hook, but fired only when the user gets (re-)activated. This is handy when you want to be informed only when a real user is added.
Placement: includes/functions_user.php inside user_add and user_active_flip:
Parameters: Not sure, I'm currently only using user_id, but I guess it would be good to pass $sql_ary

In fact for the event in user_add, we could as well use the user_add hook and test if the user is active.
However, the user_add is obviously not appropriate inside the user_active_flip function, hence my request for a seperate event, fired in both cases.

Note that in user_active_flip, I currently execute my logic following this:

Code: Select all

			$sql = 'UPDATE ' . USERS_TABLE . '
				SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
				WHERE user_id = ' . $user_id;
			$db->sql_query($sql);
Ticket: https://tracker.phpbb.com/browse/PHPBB3-13336
Last edited by Tomba on Thu Nov 13, 2014 5:43 pm, edited 2 times in total.

User avatar
Marc
Development Team Leader
Development Team Leader
Posts: 123
Joined: Thu Sep 09, 2010 11:36 am
Location: Munich, Germany

Re: [RFC] User activate hook

Post by Marc » Sat Nov 16, 2013 3:08 pm

Please fix your request as written here:
viewtopic.php?f=111&t=42685

User avatar
rxu
Registered User
Posts: 124
Joined: Tue Apr 04, 2006 4:28 pm
Contact:

Re: [RFC] User activate hook

Post by rxu » Sun Sep 14, 2014 3:29 am

Tomba
Will it work for you adding an event before the if (sizeof($sql_statements)) having $sql_statements, $deactivated, $activated passed to it?
Image

Tomba
Registered User
Posts: 13
Joined: Sat Apr 12, 2003 1:59 pm

Re: [RFC] User activate hook

Post by Tomba » Wed Nov 12, 2014 9:43 pm

rxu wrote:Tomba
Will it work for you adding an event before the if (sizeof($sql_statements)) having $sql_statements, $deactivated, $activated passed to it?
I guess that could work as well yes.
Rather than updating, it would prevent the actual update, so I'd be ok with that ;)

PS: sorry for delay, now checked the "notify me" box ;)
PPS: @team: I'm unable to create a ticket, as for some reason I cannot login to the bugtracker. Can someone check that out please?

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1731
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC] User activate hook

Post by DavidIQ » Thu Nov 13, 2014 2:41 pm

Tomba wrote:PPS: @team: I'm unable to create a ticket, as for some reason I cannot login to the bugtracker. Can someone check that out please?
You need to have an active account on our forum at http://www.phpbb.com/community in order to have an account on the tracker. The account information from phpbb.com will be your account login information for the tracker, not your account here on Area 51.
Image

Tomba
Registered User
Posts: 13
Joined: Sat Apr 12, 2003 1:59 pm

Re: [PHP] core.user_activate

Post by Tomba » Thu Nov 13, 2014 5:42 pm

David, turns out username is case sensitive. My bad.

Anyway, here's the ticket:
https://tracker.phpbb.com/browse/PHPBB3-13336

User avatar
rxu
Registered User
Posts: 124
Joined: Tue Apr 04, 2006 4:28 pm
Contact:

Re: [PHP] core.user_activate

Post by rxu » Thu Jan 22, 2015 4:47 pm

Image

Post Reply