Loading...
 
Skip to main content

username is case sensitive for mail notifications, and gets no email when using the other case

Status
Closed
Subject
username is case sensitive for mail notifications, and gets no email when using the other case
Version
2.x
Category
  • Error
  • Dogfood on a *.tiki.org site
Feature
User Administration (Registration, Login & Banning)
InterTiki
Resolution status
Fixed or Solved
Submitted by
Xavier de Pedro
Lastmod by
pkdille
Rating
(0)
Description

I have two users at tw.o: xavi and xavidp. Both with lower case.

I can log in on doc.tw.o using either Xavi or xavi. When I log in with user Xavi, when I click on watching adding a page, or watching another page, I get this type of error:

Copy to clipboard
An error occured in a database query! Context: File tiki-editpage.php Url tiki-editpage.php Query: insert into `tiki_user_watches`(`user`,`event`,`object`,`email`,`type`,`title`,`url`) values(?,?,?,?,?,?,?) Values: 0 Xavi 1 wiki_page_changed 2 Tikiwiki 1.10 ca 3 NULL 4 wiki page 5 Tikiwiki 1.10 ca 6 tiki-index.php?page=Tikiwiki 1.10 ca Message: Column 'email' cannot be null Built query was probably: insert into `tiki_user_watches`(`user`,`event`,`object`,`email`,`type`,`title`,`url`) values('Xavi','wiki_page_changed','Tikiwiki 1.10 ca',NULL,'wiki page','Tikiwiki 1.10 ca','tiki-index.php?page=Tikiwiki 1.10 ca')
Solution

Are you sure an email is associated with each account ? I was not able to reproduce the problem with upper/lower case login.

But, the problem occurs when one tries to add a watch on an object without an email adress associated with his account. This is, of course a bug and has to be fixed.

There a two ways to fix this:

  • test if email is present before showing "add watch buttons"
  • show an error message (or warning) if somebody adds a watch and does not have an email.


Finally, I solved it with an error message added in function add_user_watch (tikilib.php).

Importance
5
Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
1719
Created
Tuesday 22 April, 2008 15:38:19 UTC
by Unknown
LastModif
Sunday 18 May, 2008 14:32:26 UTC


Show PHP error messages