english/administrator/components/com_users/controllers/user.php
/**
	 * Overrides parent save method to check the submitted passwords match.
	 *
	 * @return	mixed	Boolean or JError.
	 * @since	1.6
	 */
Overrides parent save method to check the submitted passwords match.
@return      mixed   Boolean or JError.
Overrides parent save method to check the submitted passwords match . @return mixed Boolean or JError .
public function save($key = null, $urlVar = null)
	{
		$data = JRequest::getVar('jform', array(), 'post', 'array');
		if (isset($data['password']) && isset($data['password2'])) {
			if ($data['password'] != $data['password2']) {
				$this->setMessage(JText::_('JLIB_USER_ERROR_PASSWORD_NOT_MATCH'), 'warning');
				$this->setRedirect(JRoute::_('index.php?option=com_users&view=user&layout=edit', false));
			}
			unset($data['password2']);
		}
		return parent::save();
	}
public function save ( $ key = null , $ urlVar = null ) { $ data = JRequest :: getVar ( 'jform' , array ( ) , 'post' , 'array' ) ; if ( isset ( $ data [ 'password' ] ) && isset ( $ data [ 'password2' ] ) ) { if ( $ data [ 'password' ] != $ data [ 'password2' ] ) { $ this -> setMessage ( JText :: _ ( 'JLIB_USER_ERROR_PASSWORD_NOT_MATCH' ) , 'warning' ) ; $ this -> setRedirect ( JRoute :: _ ( 'index.php?option=com_users&view=user&layout=edit' , false ) ) ; } unset ( $ data [ 'password2' ] ) ; } return parent :: save ( ) ; }
Overrides parent save method to check the submitted passwords match.
Overrides parent save method to check the submitted passwords match .
// TODO: JForm should really have a validation handler for this. // Check the passwords match.