Jump to content

Disable Birthday Editing on 'My Settings'


Adriano Faria

Recommended Posts

%7Boption%7D



File Name: Disable Birthday Editing on 'My Settings'

File Submitter: Adriano Faria

File Submitted: 05 Feb 2013

File Category: User and Social Engagement

Supported Versions: IP.Board 3.4.x



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

Link to comment
Share on other sites

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?

<if test="IPSMember($this->memberData->something)<18">
 
  Display this
 
<else />
 
  Display this
 
</if>
Link to comment
Share on other sites

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?

Do something like that:

<php>
$age = ( $this->memberData['bday_year'] ) ? date( 'Y' ) - $this->memberData['bday_year'] : 0;
</php>
<if test="$age > 18">
You are 18+ years old
<else />
You don't have 18 years!!!
</if>
Link to comment
Share on other sites

  • 4 months later...
  • 4 months later...
  • 2 years later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...