You can simply follow this path to update the entry in yii.
$user = User::model()->findByPk($userId); $user->username = 'hello world'; $user->password = 'password'; $user->update();
How to save a new entry in yii?
$user = new User(); $user->username = 'hello world'; $user->password = 'password'; $user->save();
How to delete an entry in yii?
$user = User::model()->findByPk($userId); $user->delete()
source share