Changing values in Yii::app()->user?

I asked this some time ago, but didn’t receive an answer that worked, and now I need one urgently.

On signing up for my site, a user’s email is considered their name, stored in Yii::app()->user->name - mostly because without some value to display, the whole thing will just fall apart. But the email is never supposed to be revealed to others. A user is not able to post or do anything until they have set up an actual account with a normal name. At that time, the user’s actual account name is stored in Yii::app()->user->name. That value is then what is put on posts, amongst other things.

However, this does not always work. It is intermittent, random, and I really don’t care what it is, I need it to stop.

How do I change "Yii::app()->user->name = $value" to something that will steamroll over every possible roadblock and give me a 200%, absolute guarantee that the next time a page is loaded, Yii::app()->user->name will contain the specified value?

No known caching, shared hosting situation with unknown specs; if there’s something I may or may not need to compensate for, just tell me, no need to ask.

Use the model. :)

Not the webuser which is stored in the user session, hence the weirdness.

You might be able to get around it by simply terminating the user session.

I would use the model for getting the users name (textual id).

The model requires another database lookup. If that can be avoided - especially in the chat - I want to do so.

A logout/login will fix the issue, presumably due to terminating the session. Can I do that without ever actually affecting the user?