• Trebly

    (@trebly)


    Hi,

    Thanks for the new version that I had run successfully just now after ten month spent for me far from WP development.

    Since two year and before this new version I had problems with some concepts and particularly the roles of the visitor. Now the visitors can be attached to a group.

    Today I have several questions for which I have not found clear element into documentation or support forum.

    I am going to separate into several post the different questions so that we could get clear discussions.

    Here my first question is about the WP function “current_user_can(capability)”.
    Correlatively I have not found the documentation about the UAM API.

    Nevertheless the question can be formulated as this :
    < With the use of UAM we can control the capability of viewing objects (read post for most common example), then UAM may should create with “Plugin API/Filter Reference/user has cap” a filter to define this right capability (unknown in standard CODEX). Then using “current_user_can(“view_post”)” as example will become a valid indirect request to UAM checker. >

    Remark: This follows the same problem that I summit last year and lead to introduce the “not_registered” user role into UAM group definitions.

    The challenge is to extend “capabilities” valid values to a coherent list with UAM features.

    My example :
    I have to check early in to the code for a list of elements if the access will be allowed or not.
    The quite evident solution is to use “current_user_can(capability,Id)” which would answer in coherency with UAM.

    Best regards

    Trebly

    • This topic was modified 7 years ago by Trebly.
  • The topic ‘What’s about the “current_user_can()” function’ is closed to new replies.