![]() |
Save old emails?
I want to update a hack that I used on vb3.0 that would save the old email address if a user other than usergroup 3 (awaiting email confirmation) changed it. The old hck used 2 queries in the profile, 1 to pull the email and one to update he profile field. I used a profile field to show the old emails but to admins only in the profile.
I'm not sure where to add it (the hook location) now and can I do it without 2 queries? |
I think you can do it without any Query (untested)
userdata_presave PHP Code:
|
Ok, I'll test this and get back to you. Thank you, sir. ;)
How would I go about adding a comma and a space between each email like the currently active users does? |
Change:
PHP Code:
PHP Code:
|
And then change
PHP Code:
PHP Code:
|
Lol, correct. :D
|
LMAO @ Kirby. You guys kill me! LOL
Thank you both, sirs. ;) |
4th Revision of 1 Code line (LOL):
PHP Code:
|
Ok, that works now (after taking out one of these right parenthesis: ('fieldxx'))from the secoind variable) LOL
It is listing the emails like it should. But if you change the email back to what it once was, it relists that email again. Is that the way it should work? |
Yes. If you want to avoid that, wrap it in if (strpos($this->fetch_field('fieldxx'), $this->fetch_field('email')) === false)
|
Like this?
PHP Code:
|
Then you it would only execute if the email is already in the list.
Any there is a ) and a { missing. Edited my previous Post. |
Ahhh, ok, I see what I need to do now.
Like this: PHP Code:
|
The edited Version looks correct (if there are no missing brackets or whatever)
But you can shorten it PHP Code:
|
All times are GMT. The time now is 09:10 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|