<commit_before><?php

/* This file is part of the acVinComptePlugin package.
 * Copyright (c) 2011 Actualys
 * Authors :	
 * <NAME> <<EMAIL>>
 * <NAME> <<EMAIL>>
 * <NAME> <<EMAIL>>
 * <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * acVinComptePlugin form.
 * 
 * @package    acVinComptePlugin
 * @subpackage lib
 * @author     <NAME> <<EMAIL>>
 * @author     <NAME> <<EMAIL>>
 * @author     <NAME> <<EMAIL>>
 * @author     <NAME> <<EMAIL>>
 * @version    0.1
 */
class acVinCompteModificationForm extends acVinCompteForm 
{
    
    /**
     * 
     */
    public function configure() 
    {
        parent::configure();
        $this->getValidator('mdp1')->setOption('required', false);
        $this->getValidator('mdp2')->setOption('required', false);
    }
    
    
    
	public function doUpdateObject($values) {
		parent::doUpdateObject($values);
		if (!$this->getObject()->isNew()) {
			$this->getObject()->setMotDePasseSSHA($values['mdp1']);
		}
	}
}<commit_msg>Ne pas prendre en compte le mot de passe si champ non rempli<commit_after><?php

/* This file is part of the acVinComptePlugin package.
 * Copyright (c) 2011 Actualys
 * Authors :	
 * <NAME> <<EMAIL>>
 * <NAME> <<EMAIL>>
 * <NAME> <<EMAIL>>
 * <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * acVinComptePlugin form.
 * 
 * @package    acVinComptePlugin
 * @subpackage lib
 * @author     <NAME> <<EMAIL>>
 * @author     <NAME> <<EMAIL>>
 * @author     <NAME> <<EMAIL>>
 * @author     <NAME> <<EMAIL>>
 * @version    0.1
 */
class acVinCompteModificationForm extends acVinCompteForm 
{
    
    /**
     * 
     */
    public function configure() 
    {
        parent::configure();
        $this->getValidator('mdp1')->setOption('required', false);
        $this->getValidator('mdp2')->setOption('required', false);
    }
    
    
    
	public function doUpdateObject($values) {
		parent::doUpdateObject($values);
		if (!$this->getObject()->isNew() && isset($values['mdp1']) && !empty($values['mdp1'])) {
			$this->getObject()->setMotDePasseSSHA($values['mdp1']);
		}
	}
}
{'fraction_non_alphanumeric': 0.16902030008826124, 'fraction_numerical': 0.0088261253309797, 'mean_word_length': 3.2059369202226344, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 67, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6532242', 'n_tokens_mistral': 768, 'n_tokens_neox': 746, 'n_words': 174}