February 5, 2013 in Marketplace
File Name: Disable Birthday Editing on 'My Settings'
File Submitter: Adriano Faria
File Submitted: 05 Feb 2013
File Category: User and Social Engagement
This hook won't allow users to edit their birthday on My Settings (Control Panel). If the member hasn't filled yet his birthday, he can do it on My Settings (Control Panel). After he saves it, he can't edit it anymore 'cause the 3 fileds (day, month and year) won't appear anymore on My Settings.
Ideal for use in conjunction with this hook:
here to download this file
I know this is a cheeky question not really related to your hook, but... if someone has their DOB set through this and your registration hook, is it possible to then test if a member is above or below a certain age and use that for example in a display template?
Where exacly you want to display this?
Probably in an ipContent block.
There's a way to get the age. Can't do it now 'cause I'm on mobile. I'll post it tomorrow.
Do something like that:
$age = ( $this->memberData['bday_year'] ) ? date( 'Y' ) - $this->memberData['bday_year'] : 0;
<if test="$age > 18">
You are 18+ years old
You don't have 18 years!!!
Brilliant thank you, I'll give it a go over the weekend. This will help me a lot with our <18's section so will combine it with your hooks to create some display filters.
will this one work on 3.3.x ?
What's New in Version 1.0.1:
any chance this will get updated for IPB4
This topic is now archived and is closed to further replies.
Started 2 hours ago
Started 4 hours ago
Started 3 hours ago