public function onSaving()
    {
        // If the password is changing, hash it
        if ($this->isDirty('password')) {
            $this->password = bcrypt($this->password);
        }

        // Save or clear permission choices if the form had a "custom permissions"
        // pushed checkbox
        if (Request::exists('_custom_permissions')) {
            $this->permissions = request('_custom_permissions') ?
                json_encode(request('_permission')) : null;
        }
    }