This question already has an answer here:
I'm building a function into the account management software I'm working on that allows the user to "lock" themselves into a mode where all the content/data being displayed is relevant to a single account (chosen by the user).
Currently this is triggered by a button with the name of the feature and a padlock icon.
Right now the state of the padlock icon is tied to the action you're carrying out by clicking it. When the function is off, the action is to lock, and we show a locked padlock.
When the function is on, the action would be to unlock, so we show an unlocked padlock.
There are plenty of other signifiers and confirmations in the mix, so I'm not worried about the icon alone confusing users, but does it make more sense to reverse things and have the icon display the current state rather than the action? e.g. Display as locked when the user is locked into an account, and unlocked when they're not.