don't know why it happens, here is the sample of the code
$uid = Yii::$app->user->identity->ID;
if($id != null){
$model = self::findOne($id);
}
else{
$model = self::find()->select('ID, connection_uri, version, username, password')->where('
enabled = :en AND user_id = :userid
' ,[':en' => 1, ':userid' => $uid])->one();
}
When this line is being processed $uid = Yii::$app->user->identity->ID;
the whole server is getting very slower and I cannot do any other thing only to wait while the function is being finished. When I delete that line and for example type this : $uid = 1;
then everything is ok. Do you have any ideas why it might happen?