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.