public function visitPage($operation, $value = '')
    {
        $column = $value;

        // If we have an empty value then try to use current user.
        if ('' !== $value) {
            $column = strpos($value, '@') === false ? 'name' : 'mail';
        }

        // This helps us restrict an access for editing for users without correct permissions.
        // Will check for 403 HTTP status code.
        $this->getRedirectContext()
            // Check user by email if value contains a "dog" symbol.
            ->visitPage($this->entityUrl($operation, $column, $value));
    }
public function visitPage($operation, $value = '')
    {
        $column = $value;

        // If we have an empty value then try to use current user.
        if ('' !== $value) {
            $column = strpos($value, '@') === false ? 'name' : 'mail';
        }

        // This helps us restrict an access for editing for users without correct permissions.
        // Will check for 403 HTTP status code.
        $this->getRedirectContext()
            // Check user by email if value contains a "dog" symbol.
            ->visitPage($this->entityUrl($operation, $column, $value));
    }
@param string $operation
Allowable values: "edit", "view", "visit".
@param string $value
The name or email of a user.

@When /^(?:|I )(visit|view|edit) (?:the "([^"]+)"|current) user$/