Hi all,
I have the following issue:
I have a local db with comments and I need to do some actions with some users I’m getting via an API request. Code is something like this:
class RunCronCommand extends CConsoleCommand {
public function actionIndex() {
...
$comments = Comment::model()->findAll('status = :status', array(':status' => Comment::ACTIVE));
foreach ($comments as $comment) {
$profile = Yii::app()->api->get('/users/'. $comment->user_id . '/getProfile');
}
...
}
any help is appreciated! thanks in advance!