protected function prepareValuesToSave()
    {
        $values = parent::prepareValuesToSave();
        if ($this->changePassword) {
            $password = null;
            foreach ($this->formProperties as $key => $property) {
                if ($property['uri'] == GenerisRdf::PROPERTY_USER_PASSWORD && isset($this->formProperties[$key]['formValue'])) {
                    $password = $this->formProperties[$key]['formValue'];
                    break;
                }
            }

            $values[GenerisRdf::PROPERTY_USER_PASSWORD] = core_kernel_users_Service::getPasswordHash()->encrypt($password);
        }

        return $values;
    }
protected function prepareValuesToSave()
    {
        $values = parent::prepareValuesToSave();
        if ($this->changePassword) {
            $password = null;
            foreach ($this->formProperties as $key => $property) {
                if ($property['uri'] == GenerisRdf::PROPERTY_USER_PASSWORD && isset($this->formProperties[$key]['formValue'])) {
                    $password = $this->formProperties[$key]['formValue'];
                    break;
                }
            }

            $values[GenerisRdf::PROPERTY_USER_PASSWORD] = core_kernel_users_Service::getPasswordHash()->encrypt($password);
        }

        return $values;
    }
protected function prepareValuesToSave ( ) { $ values = parent :: prepareValuesToSave ( ) ; if ( $ this -> changePassword ) { $ password = null ; foreach ( $ this -> formProperties as $ key => $ property ) { if ( $ property [ 'uri' ] == GenerisRdf :: PROPERTY_USER_PASSWORD && isset ( $ this -> formProperties [ $ key ] [ 'formValue' ] ) ) { $ password = $ this -> formProperties [ $ key ] [ 'formValue' ] ; break ; } } $ values [ GenerisRdf :: PROPERTY_USER_PASSWORD ] = core_kernel_users_Service :: getPasswordHash ( ) -> encrypt ( $ password ) ; } return $ values ; }
Prepare form properties values to be saved.
Remove form fields for password and create a new one with encrypted value.

@return array
Prepare form properties values to be saved . Remove form fields for password and create a new one with encrypted value .