frontend/controllers/CheckoutController.php
/*
     * add this user used this code
     */
add this user used this code
add this user used this code
public function AddUsed($code_exists) {
        $code_exists->code_used = $code_exists->code_used . ',' . Yii::$app->user->identity->id;
        $code_exists->save();
    }
public function AddUsed ( $ code_exists ) { $ code_exists -> code_used = $ code_exists -> code_used . ',' . Yii :: $ app -> user -> identity -> id ; $ code_exists -> save ( ) ; }
add this user used this code
add this user used this code