• Resolved Matt Jensen

    (@ultrawebsites)


    Hey there

    I was just wondering out aloud: for fields that have default values and that need certain permissions to be seen by the user, should the default value be entered in to the database when they submit the form but if the user can’t actually see the field?

    I am inclined to think it should (particularly given I have this issue at the moment!). Part of the problem though comes from the fact that I am using custom roles (inc. WordPress’ newer capability permissions system) as well as this plugin though, and that custom roles now seem to have the wp_user_level value defaulting to 0.

    Interested in any comments.
    Cheers
    Matt

Viewing 4 replies - 16 through 19 (of 19 total)
  • Thread Starter Matt Jensen

    (@ultrawebsites)

    Hey, no the field wasn’t visible to this admin user, but they got the error message that it can’t be empty.

    Using Justin Tadlock’s Members plugin, I’ve created some “custom admin” roles for the club members that are on the club committee – for example, some of them can update members profiles (eg. to say they paid their membership for this year). And for these roles, I’ve given some of them the ‘view_cimy_extra_fields’ capability (and by the way, because it is a custom role, the role has a level of 0 (given WordPress doesn’t seem to user Levels any more)). So this custom role shouldn’t be able to see or edit this field, but obviously they then shouldn’t get an error saying that the field can’t be blank given they can’t see it.

    HTH
    Matt

    Plugin Author Marco Cimmino

    (@cimmo)

    Indeed was a bug there since ages, strange nobody noticed before.
    Can you download again and test with the above settings that triggered it please?

    EDIT:
    Indeed I introduced with my latest patch, wasn’t there before 🙂

    Thread Starter Matt Jensen

    (@ultrawebsites)

    Hey dude, sorry for the delay responding.

    Ok, I’ve just done some fairly thorough testing.

    – reproduced the bug on the older dev version of the plugin
    – upgrade to the new plugin
    – verified the problem went away

    Then I tested:

    – creating a user
    -updating a user
    -updating another user
    -updating my own profile

    for each of the following user types:

    – a full Admin
    – a ‘custom’ Admin with ‘view_cimy_user_field’
    – a normal user with no admin related permissions (although obviously I couldn’t test updating other users since this user didn’t have access)

    and all tests passed.

    So looks good thanks very much Cimmmo!

    Cheers
    Matt

    Plugin Author Marco Cimmino

    (@cimmo)

    Cool, thanks.

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘[Plugin: Cimy User Extra Fields] Question: Default values for fields if user doesn't have permi’ is closed to new replies.