Thursday 07 April 2016 5:18:59 pm - 1 reply
I created an extension in which I have to register users. After register I verify if the user already exists by searching for the login of my user_account datatype.
I tried this :
$ident = "'".$_POST["identifiant"]."*'"; $criteres = array("candidat/user_account", "like", $ident); $nodes = eZContentObjectTreeNode::subTreeByNodeID( array( 'ClassFilterType'=>'include', 'ClassFilterArray'=>array('candidat'), 'AttributeFilter' => $criteres), $defaultUserPlacement );
It doesn't work.
I tried to search with ezfind but when the user is registered, he's not indexed directly in solR, so if I try to register a new user with the same login it works because the user is not found in the index...
I use the Community Project 2012.8 version.
Modified on Thursday 07 April 2016 5:25:04 pm by Solène Guillot
Thursday 21 April 2016 2:58:57 pm
Finally I did it :
$search = eZFunctionHandler::execute('content', 'search', array( "text" => $_POST["identifiant"], "subtree_array" => array($defaultUserPlacement), "class_id" => $userClassID, "class_attribute_id" => $userAttributeAccountID));
and it worked fine
Modified on Thursday 21 April 2016 3:00:42 pm by Solène Guillot
You must be logged in to post messages in this topic!