backend/modules/api/controllers/AuthController.php
/**
    * midelware for AngularJs
    * @return Array with status and User Identity object
    */
midelware for AngularJs
@return Array with status and User Identity object
midelware for AngularJs @return Array with status and User Identity object
public function actionGetauthuser(){
        if(Yii::$app->user->isGuest){
            return ['status'=>false,'resource'=>null];
        }
        else{
          return ['status'=>true,'resource'=>Yii::$app->user->identity];
        }
    }
public function actionGetauthuser ( ) { if ( Yii :: $ app -> user -> isGuest ) { return [ 'status' => false , 'resource' => null ] ; } else { return [ 'status' => true , 'resource' => Yii :: $ app -> user -> identity ] ; } }
midelware for AngularJs
 @return Array with status and User Identity object
midelware for AngularJs @return Array with status and User Identity object