how to change the keyPrefix property of CWebUser class?

what's the advantage of using keyPrefix?

and how to change the keyPrefix property of user component?

i can only find the getKeyPrefix method…

stateKeyPrefix is used to differentiate the user session storage one application from another. If you want to use your own key prefix generation, you need to override getStateKeyPrefix() method.

i think it's more convinient to add asetKeyPrefix method…

Well, in most cases you don't need to modify the key prefix…