common/models/entities/User.php
public static function findIdentity( $id ) {

		// Find valid User
		$user = static::findById( $id );

		// Load User Permissions
		if( isset( $user ) ) {

			if( Yii::$app->core->isRbac() ) {

				$user->loadPermissions();
			}

			return $user;
		}

		throw new NotFoundHttpException( Yii::$app->coreMessage->getMessage( CoreGlobal::ERROR_NOT_FOUND ) );
	}
public static function findIdentity( $id ) {

		// Find valid User
		$user = static::findById( $id );

		// Load User Permissions
		if( isset( $user ) ) {

			if( Yii::$app->core->isRbac() ) {

				$user->loadPermissions();
			}

			return $user;
		}

		throw new NotFoundHttpException( Yii::$app->coreMessage->getMessage( CoreGlobal::ERROR_NOT_FOUND ) );
	}
public static function findIdentity ( $ id ) { // Find valid User $ user = static :: findById ( $ id ) ; // Load User Permissions if ( isset ( $ user ) ) { if ( Yii :: $ app -> core -> isRbac ( ) ) { $ user -> loadPermissions ( ) ; } return $ user ; } throw new NotFoundHttpException ( Yii :: $ app -> coreMessage -> getMessage ( CoreGlobal :: ERROR_NOT_FOUND ) ) ; }
Finds user identity using the given id and also loads the available permissions if
RBAC is enabled for the application.

@param integer $id
@throws \yii\web\NotFoundHttpException
@return User based on given id.
Finds user identity using the given id and also loads the available permissions if RBAC is enabled for the application .