# Traga o nível de permissão do WordPress MemberPress

**URL:** <https://meta.discourse.org/t/bring-over-permission-level-from-wordpress-memberpress/78074>\
**Category:** WordPress\
**Created:** [15 Janeiro , 2018 16:26 UTC](https://meta.discourse.org/t/bring-over-permission-level-from-wordpress-memberpress/78074 "2018-01-15T16:26:13Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [28 Março , 2018 18:24 UTC](https://meta.discourse.org/t/bring-over-permission-level-from-wordpress-memberpress/78074/7 "2018-03-28T18:24:51Z")

</div>

The basic idea makes sense. `current_user_can` is a WordPress function. Its documentation is [here](https://codex.wordpress.org/Function_Reference/current_user_can). I think that in this case you are fine to call it without the `$object_id` argument. If MemberPress adds `mepr-active` as a `role` or `capability` to users when they sign up for any membership level, and removes the `mepr-active` `role` or `capability` when the membership expires, then it will do what you are looking for.

Be careful with the comment (`// Don't use spaces between names.`). Comments in that form need to be included on a single line, or they will cause an error. You can remove the comment from the code.

---

_[View the full topic](https://meta.discourse.org/t/bring-over-permission-level-from-wordpress-memberpress/78074)._
