common/models/forms/Login.php
public function getUser() {

		// Find user having email or username
		if( empty( $this->user ) ) {

			$this->user = $this->userService->getByEmail( $this->email );

			if( empty( $this->user ) ) {

				$this->user = $this->userService->getByUsername( $this->email );
			}
		}

		return $this->user;
	}
public function getUser() {

		// Find user having email or username
		if( empty( $this->user ) ) {

			$this->user = $this->userService->getByEmail( $this->email );

			if( empty( $this->user ) ) {

				$this->user = $this->userService->getByUsername( $this->email );
			}
		}

		return $this->user;
	}
public function getUser ( ) { // Find user having email or username if ( empty ( $ this -> user ) ) { $ this -> user = $ this -> userService -> getByEmail ( $ this -> email ) ; if ( empty ( $ this -> user ) ) { $ this -> user = $ this -> userService -> getByUsername ( $ this -> email ) ; } } return $ this -> user ; }
Find and return the user using given email or username.

@return \cmsgears\core\common\models\entities\User
Find and return the user using given email or username .