public function getByUsername($username)
    {
        $filter = new IteratorFilter();
        $filter->addRelation($this->getUserDefinition()->getUsername(), Relation::EQUAL, $username);
        return $this->getUser($filter);
    }
public function getByUsername($username)
    {
        $filter = new IteratorFilter();
        $filter->addRelation($this->getUserDefinition()->getUsername(), Relation::EQUAL, $username);
        return $this->getUser($filter);
    }
public function getByUsername ( $ username ) { $ filter = new IteratorFilter ( ) ; $ filter -> addRelation ( $ this -> getUserDefinition ( ) -> getUsername ( ) , Relation :: EQUAL , $ username ) ; return $ this -> getUser ( $ filter ) ; }
Get the user based on his username.
Return Row if user was found; null, otherwise

@param $username
@return UserModel
@throws \ByJG\Serializer\Exception\InvalidArgumentException
Get the user based on his username . Return Row if user was found ; null otherwise