Page 1 of 1
Re: Bug: Can't post with Email field empty or turned off
Posted: 29 Jul 2009, 01:05
by Jan
Hi, did you set the parameters in parameters component?
https://www.phoca.cz/documents/16-joomla ... -in-joomla
If you are not logged in, system doesn't know you and you cannot use email address which is used by some registered user (in case you write your email adress which is registered for you and you are not logged in, system doesn't know you and you cannot use this email address - search this forum, I have explained it here)
is it really necessary to check entered email adresses against the user database at all, even when entries are made by guests
- yes, you cannot use email of other person. If you will register into some system, you will not like if somebody other will write messages with your name and with your email address. So the checking the email is necessary. Anonymous users cannot use email adress of some registered user. This is the worst case you can do for your registered users

Re: Bug: Can't post with Email field empty or turned off
Posted: 30 Oct 2009, 18:19
by Micha
Find this post also (nice). The user email address, I use only in the backend so i can contact this person (if I want to).
I don't show the user email address on the frontpage so it doens't matter if someone use a mail address from a reg.user.
A review is a review and for me, only a name is good enough for the guestbook. So in my opinion is this emailaddress check not necessary. How can we switch off this check?
If there is no solution I must switch off the e-mail field. But i prefer a email address in the back-end so i always can contact the person. But can the email field be switched off so everyone can write reviews? Because the topic starter never gave a reaction to the answer from Jan
Thanks everyone,
Micha
Re: Bug: Can't post with Email field empty or turned off
Posted: 30 Oct 2009, 18:28
by Jan
Re: Bug: Can't post with Email field empty or turned off
Posted: 07 Dec 2009, 09:57
by rawu
I would like to come back to the original thread.
My parameters in global configuration and menü are:
E-Mail-Adress required: no
Display E-Mail input field in message form: no
So the user does not have any possibility of entering an e-mail-address. Nevertheless the message appears: This e-mail-adress already exists!
Why?
best regards!
Ralf
Re: Bug: Can't post with Email field empty or turned off
Posted: 07 Dec 2009, 19:40
by Jan
Hi, did you set it in parameters component in menu link to guestbook? is the input field displayed in frontend?
See:
https://www.phoca.cz/documents/16-joomla ... -in-joomla
Jan
Re: Bug: Can't post with Email field empty or turned off
Posted: 08 Dec 2009, 09:14
by rawu
Jan wrote:Hi, did you set it in parameters component in menu link to guestbook?
yes, also in global configuration
Jan wrote: is the input field displayed in frontend?
no
I've solved the problem with a change in /com_phocaguestbook/controllers/phocaguestbook.php
Change line 300 to 310:
Code: Select all
// check for existing email
$query = 'SELECT id'
. ' FROM #__users '
. ' WHERE email = '. $db->Quote($post['email'])
. ' AND id != '. (int) $user->id
;
$db->setQuery( $query );
$xid = intval( $db->loadResult() );
if ($xid && $xid != intval( $user->id )) {
$email = 0; JRequest::setVar( 'email-msg-3', 1, 'get',true );
}
to
Code: Select all
// check for existing email
if ($post['email'] && trim($post['email']) !='' )
{
$query = 'SELECT id'
. ' FROM #__users '
. ' WHERE email = '. $db->Quote($post['email'])
. ' AND id != '. (int) $user->id
;
$db->setQuery( $query );
$xid = intval( $db->loadResult() );
if ($xid && $xid != intval( $user->id )) {
$email = 0; JRequest::setVar( 'email-msg-3', 1, 'get',true );
}
}
Can you verify this change?
best regards
Ralf
Re: Bug: Can't post with Email field empty or turned off
Posted: 09 Dec 2009, 17:12
by Jan
Seems that it can work.