what is the difference in using session between
Yii :: app () -> getSession () -> add ('variableName', 'valorVariable');
and
Yii :: app () -> user-> setState ('variableName', 'valorVariable');
in yii
which would you use for the following scenarios and give me advice
-
For a user logged
-
For a user not logged in
-
User for the first case to pass after the second case