Lack of interest Add gender to UserModel::prepareUserConditions

  • Thread starter Thread starter ragtek
  • Start date Start date
This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.
R

ragtek

Guest
We're having already a nice set of conditions here, but a IMO important condition is also the gender.

I know that we're able to add this via add-ons, but nobody wants to use my framework which extends the xf core and i don't want to include the same event to extend the prepareUserConditions in all add-ons where it's needed.
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
You can check the gender in templates already...

HTML:
<xen:if is="{$visitor.gender} == "male">This would be displayed to all men</xen:if>
<xen:if is="{$visitor.gender} =="female">This would be displayed to all women</xen:if>
<xen:if is="!{$visitor.gender} OR {$visitor.gender} == """>This would be shown to anyone who hasn't set a gender</xen:if>
 
It's for grabbing all male/female users.

$criteria = array( 'gender' => 'male') $usermodel->getUsers($criteria);

will return only male users.

ATM i would need to use a own query for this, or extend the prepareUserConditions method
 
It's for grabbing all male/female users.

$criteria = array( 'gender' => 'male') $usermodel->getUsers($criteria);

will return only male users.

ATM i would need to use a own query for this, or extend the prepareUserConditions method

ahhh right I understand sorry didn't read the thread title properly... Yes this would be very useful!
 
Top Bottom