src/models/UserOnline.php
public static function unlock($userId)
    {
        $model = self::findOne(['user_id' => $userId]);
    
        if ($model) {
            $model->updateAttributes([
                'last_timestamp' => time(),
                'lock_table' => '',
                'lock_pk' => '',
                'lock_translation' => '',
                'lock_translation_args' => '',
            ]);
        }
    }
public static function unlock($userId)
    {
        $model = self::findOne(['user_id' => $userId]);
    
        if ($model) {
            $model->updateAttributes([
                'last_timestamp' => time(),
                'lock_table' => '',
                'lock_pk' => '',
                'lock_translation' => '',
                'lock_translation_args' => '',
            ]);
        }
    }
public static function unlock ( $ userId ) { $ model = self :: findOne ( [ 'user_id' => $ userId ] ) ; if ( $ model ) { $ model -> updateAttributes ( [ 'last_timestamp' => time ( ) , 'lock_table' => '' , 'lock_pk' => '' , 'lock_translation' => '' , 'lock_translation_args' => '' , ] ) ; } }
Unlock the user from an action.

@param integer $userId
Unlock the user from an action .