Falcon Ryu
Falcon Ryu

Reputation: 485

Joomla strip '@' sign when email was provided in input text box

I got a problem i created a Joomla to Liferay migrator module in Joomla I created a simple form but when an email was provided in text box it strip the '@' sign, how to resolve it?

this is my code

    <form action="index.php" method="post">
        <input type="hidden" name="form_send" value="send" />

        <label>Liferay API Url:</label>
        <input type="text" name="url" value="" size="40"/><br/>

        <label>Port:</label>
        <input type="text" name="port" value="" size="5"/><br/>

        <label>Username:</label>
        <input type="email" name="username" value="" size="40"/><br/>

        <label>Password:</label>
        <input type="password" name="password" value="" size="40"/><br/>

    <h3>Liferay API Details</h3>

        <label>GroupId:</label>
        <input type="text" name="groupId" value="" size="40" required /><br/>

        <label>FolderId:</label>
        <select name="folderId">
            <option value="0">None</option>
            <option value="1">My Article</option>
        </select><br/>

        <label>DDMStructureKey:</label>
        <input type="text" name="ddmStructureKey" value="" size="40" required /><br/>

        <label>DDMTemplateKey:</label>
        <input type="text" name="ddmTemplateKey" value="" size="40" required /><br/>

        <input type="submit" name="send" value="Import" />

    </form>



$jinput = JFactory::getApplication()->input;
$url = $jinput->get('url');
$port = $jinput->get('port');
$username = $jinput->get('username');
$password = $jinput->get('password');
$groupId = $jinput->get('groupId');
$folderId =  $jinput->get('folderId');
$ddmStructureKey =  $jinput->get('ddmStructureKey');
$ddmTemplateKey =  $jinput->get('ddmTemplateKey');

Upvotes: 0

Views: 61

Answers (1)

Olaf Kock
Olaf Kock

Reputation: 48057

A short form of a basic authentication url is username:[email protected]. Imagine what happens, when there is a @ in the username.

You can configure Liferay so that you'll have to use user id instead of user name. In fact, if memory doesn't fall me, that's the default.

Upvotes: 1

Related Questions