• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Lack of interest Add gender to UserModel::prepareUserConditions

R

ragtek

Guest
#1
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.
 

Cezz

Well-known member
#2
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>
 
R

ragtek

Guest
#3
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
 

Cezz

Well-known member
#4
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!