public static function authUserByCode($code)
 {
     if (!($onedriveUserAccess = OnedriveUserAccess::findByAttributes(['user_id' => Yii::$app->user->model->id]))) {
         $onedriveUserAccess = new OnedriveUserAccess();
         $onedriveUserAccess->setAttributes(['user_id' => Yii::$app->user->model->id, 'code' => $code]);
     }
     $onedriveUserAccess->code = $code;
     @$onedriveUserAccess->getAuthTokenFromOnedrive();
     return true;
 }
 public static function getTestUserToken()
 {
     $onedriveUserAccess = OnedriveUserAccess::findByAttributes(['user_id' => Yii::$app->user->model->id]);
     return $onedriveUserAccess->access_token;
 }