Custom Fields Permissions

Custom Fields Permissions 2.7.1

No permission to download
CSS:
An exception occurred: [ErrorException] [E_NOTICE] Undefined property: SV\SignupAbuseBlocking\XF\Entity\UserProfile::$custom_fields in src/addons/CmptrWz/UserDateTime/XF/Language.php on line 37

XF::handlePhpError() in src/addons/CmptrWz/UserDateTime/XF/Language.php at line 37
CmptrWz\UserDateTime\XF\Language->__construct() in src/XF/App.php at line 1249
XF\App->XF\{closure}() in

XF2.2
 
That's just part of the error message. I got that add-on a week back and the error just popup after I installed this add-on..

Full list follows:

CSS:
An exception occurred: [ErrorException] [E_NOTICE] Undefined property: SV\SignupAbuseBlocking\XF\Entity\UserProfile::$custom_fields in src/addons/CmptrWz/UserDateTime/XF/Language.php on line 37

XF::handlePhpError() in src/addons/CmptrWz/UserDateTime/XF/Language.php at line 37
CmptrWz\UserDateTime\XF\Language->__construct() in src/XF/App.php at line 1249
XF\App->XF\{closure}() in src/XF/Container.php at line 228
XF\Container->create() in src/XF/App.php at line 2738
XF\App->language() in src/XF.php at line 646
XF::language() in src/XF.php at line 746
XF::phraseDeferred() in src/XF/Repository/AbstractField.php at line 22
XF\Repository\AbstractField->getFieldTypes() in src/XF/Repository/AbstractField.php at line 135
XF\Repository\AbstractField->getFieldCacheData() in src/XF/Repository/AbstractField.php at line 165
XF\Repository\AbstractField->rebuildFieldCache() in src/addons/SV/CustomFieldPerms/CustomFieldFilterTrait.php at line 28
SV\CustomFieldPerms\XF\Entity\UserProfile->getCustomFields() in src/XF/Mvc/Entity/Entity.php at line 157
XF\Mvc\Entity\Entity->get() in src/XF/Mvc/Entity/Entity.php at line 110
XF\Mvc\Entity\Entity->__get() in src/addons/CmptrWz/UserDateTime/XF/Language.php at line 37
CmptrWz\UserDateTime\XF\Language->__construct() in src/XF/App.php at line 1249
XF\App->XF\{closure}() in src/XF/Container.php at line 228
XF\Container->create() in src/XF/App.php at line 2738
XF\App->language() in src/XF/Pub/App.php at line 187
XF\Pub\App->start() in src/XF/App.php at line 2309
XF\App->run() in src/XF.php at line 477
XF::runApp() in index.php at line 20
 
Does this allow the user themselves to decide if a particular custom field is visible to other members or not?

I'd like to add some custom fields where users can input information, always visible to the admin, but it's their choice if it's visible to other users.

If not, anyone know of anything like this?

Field edit history would be very useful too.
 
Does this allow the user themselves to decide if a particular custom field is visible to other members or not?

I'd like to add some custom fields where users can input information, always visible to the admin, but it's their choice if it's visible to other users.

If not, anyone know of anything like this?

Field edit history would be very useful too.
I think you might be able to create a usergroup promotion that could accomplish this.

Currently, I use a custom field to ask users whether they are male or female. If they select male then, using user field criteria from the custom field, it will give them a promotion adding to the men's group. This further gives them access to see certain forums.

You could create a check mark field that would allow a person to opt in to something that you want them to see. If they select that check mark then you could promote them to a usergroup where they would have the permission to see a custom field in their profile. If they are not part of the usergroup then they cannot see the field.

BTW, if you decide to go the promotion route to do this, then make sure you use this addon as well: https://xenforo.com/community/resources/user-promotion-on-profile-update.5846/

As soon as the user updates his profile opting in to see the custom feild then it will kick off the promotion so he'd be added to the usergroup and be able to see the field(s) for the usergroup he is promoted into.
 
@Xon

I would like to configure some custom fields for specific groups (inactive users) and force them to upload an avatar, configure 2step authentification,...

Can I do this with your plugin or core functions is enough?

Thx
 
Hi @Xon !

Can you add an extra feature that if the original custom user field change the 2nd one's field got deleted?

For exampe if a user has a Status
"Xbox player", "PS4 player"
I added a new custom user field that can be filled in if he select "PS4 player" called
"PS Gamertag"

if he changes the original Status to "Xbox player" even if I add a new custom userfield called "Xbox Gamertag" the value of "PS Gamertag will remain in addition to the "Xbox Gamertag".

That's what I want to remove.

This is just and example, but I hope you get the idea.
 
Hi!

On the last update from Nixfifty Ticket system we were using the permissions to show certain custom fields - now old custom fields are no longer being shown. Any new fields created are working fine.

Any idea?

Thanks!

- Rob
 
Hi!

On the last update from Nixfifty Ticket system we were using the permissions to show certain custom fields - now old custom fields are no longer being shown. Any new fields created are working fine.

Any idea?

Thanks!

- Rob
Don't worry @Xon it seems that I don't read patch notes :D
 
Hi

Could block the user to edit a custom field but let him to fill it first?

I use the custom fileds for auctions, so they need first to set a price.
 
Hello @Xon Thanks for your update but I'm getting following error after your latest update add-on used: ticket system:

Code:
     XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'cfp_o_input_bypass' in 'field list' src/XF/Db/AbstractStatement.php:230
   
   
     UPDATE  `xf_nf_tickets_ticket_field` SET `match_params` = ?, `cfp_o_input_bypass` = ?, `cfp_o_output_ui_bypass` = ?, `cfp_v_input_val` = ?, `cfp_v_output_ui_val` = ?, `cfp_c_output_ui_val` = ? WHERE `field_id` = 'rp'
------------

#0 src/XF/Db/Mysqli/Statement.php(198): XF\Db\AbstractStatement->getException('MySQL statement...', 1054, '42S22')
#1 src/XF/Db/Mysqli/Statement.php(41): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1054, '42S22')
#2 src/XF/Db/Mysqli/Statement.php(56): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Db/AbstractAdapter.php(324): XF\Db\AbstractAdapter->query('UPDATE  `xf_nf_...', Array)
#5 src/XF/Mvc/Entity/Entity.php(1519): XF\Db\AbstractAdapter->update('xf_nf_tickets_t...', Array, '`field_id` = 'r...')
#6 src/XF/Mvc/Entity/Entity.php(1246): XF\Mvc\Entity\Entity->_saveToSource()
#7 src/XF/Mvc/FormAction.php(71): XF\Mvc\Entity\Entity->save(true, false)
#8 src/XF/Mvc/FormAction.php(189): XF\Mvc\FormAction->XF\Mvc\{closure}(Object(XF\Mvc\FormAction))
#9 src/XF/Admin/Controller/AbstractField.php(191): XF\Mvc\FormAction->run()
#10 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\AbstractField->actionSave(Object(XF\Mvc\ParameterBag))
#11 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('NF\\Tickets:Tick...', 'Save', Object(XF\Mvc\RouteMatch), Object(SV\CustomFieldPerms\NF\Tickets\Admin\Controller\TicketField), NULL)
#12 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\CustomFieldPerms\NF\Tickets\Admin\Controller\TicketField), NULL)
#13 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#14 src/XF/App.php(2351): XF\Mvc\Dispatcher->run()
#15 src/XF.php(517): XF\App->run()
#16 admin.php(13): XF::runApp('XF\\Admin\\App')
#17 {main}
 
Last edited:
Hello @Xon Thanks for your update but I'm getting following error after your latest update add-on used: ticket system:

Code:
     XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'cfp_o_input_bypass' in 'field list' src/XF/Db/AbstractStatement.php:230
  
  
     UPDATE  `xf_nf_tickets_ticket_field` SET `match_params` = ?, `cfp_o_input_bypass` = ?, `cfp_o_output_ui_bypass` = ?, `cfp_v_input_val` = ?, `cfp_v_output_ui_val` = ?, `cfp_c_output_ui_val` = ? WHERE `field_id` = 'rp'
------------

#0 src/XF/Db/Mysqli/Statement.php(198): XF\Db\AbstractStatement->getException('MySQL statement...', 1054, '42S22')
#1 src/XF/Db/Mysqli/Statement.php(41): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1054, '42S22')
#2 src/XF/Db/Mysqli/Statement.php(56): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Db/AbstractAdapter.php(324): XF\Db\AbstractAdapter->query('UPDATE  `xf_nf_...', Array)
#5 src/XF/Mvc/Entity/Entity.php(1519): XF\Db\AbstractAdapter->update('xf_nf_tickets_t...', Array, '`field_id` = 'r...')
#6 src/XF/Mvc/Entity/Entity.php(1246): XF\Mvc\Entity\Entity->_saveToSource()
#7 src/XF/Mvc/FormAction.php(71): XF\Mvc\Entity\Entity->save(true, false)
#8 src/XF/Mvc/FormAction.php(189): XF\Mvc\FormAction->XF\Mvc\{closure}(Object(XF\Mvc\FormAction))
#9 src/XF/Admin/Controller/AbstractField.php(191): XF\Mvc\FormAction->run()
#10 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\AbstractField->actionSave(Object(XF\Mvc\ParameterBag))
#11 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('NF\\Tickets:Tick...', 'Save', Object(XF\Mvc\RouteMatch), Object(SV\CustomFieldPerms\NF\Tickets\Admin\Controller\TicketField), NULL)
#12 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\CustomFieldPerms\NF\Tickets\Admin\Controller\TicketField), NULL)
#13 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#14 src/XF/App.php(2351): XF\Mvc\Dispatcher->run()
#15 src/XF.php(517): XF\App->run()
#16 admin.php(13): XF::runApp('XF\\Admin\\App')
#17 {main}
Oops, It didn't apply the schema updates. Rebuilding the Tickets add-on will trigger the schema changes to be applied.

Next update will patch this add-on so upgrades & rebuilds always apply the schema changes
 
Top Bottom