lundi 26 janvier 2015

Custom capability for a single user


I have this complex scenario:


1) I'll have multiple admin users.


2) Only one admin can 'see_encrypted_pass'


Now, I want to assign custom 'see_encrypted_pass' capability to only one admin (say, John). I have a restricted page containing encrypted password. I want to use this on that page-



if(current_user_can('see_encrypted_pass')){
//show encrypted password
}


How do I do that?





Aucun commentaire:

Enregistrer un commentaire