Current time: 02-04-2012, 02:40 AM Hello There, Guest! (LoginRegister)


[F] Mod-CP - Edit User & Birthday [C-Chris W B.]
06-28-2009, 10:49 AM
Post: #1
[F] Mod-CP - Edit User & Birthday [C-Chris W B.]
When you edit a user in the mod-cp and you set no birthday, you get this error:
Quote:The birthday you entered is invalid. Please enter a valid birthday or leave the field empty.

[Image: banner.png]
Visit this user's website Find all posts by this user
06-28-2009, 12:41 PM
Post: #2
RE: Mod-CP - Edit User & Birthday
That seems like the standard behavior.
Visit this user's website Find all posts by this user
06-28-2009, 01:00 PM
Post: #3
RE: Mod-CP - Edit User & Birthday
(06-28-2009 12:41 PM)Ryan Gordon Wrote:  That seems like the standard behavior.
But it does not make sense. A user is not forced to enter his birthday and you cannot know the birthday dates of all your users.

Greets,
Michael
-------------
[Image: donation_drive_sig.png]
Visit this user's website Find all posts by this user
06-28-2009, 01:01 PM
Post: #4
RE: Mod-CP - Edit User & Birthday
But it is not possible anymore to edit a user without setting a birthday...

[Image: banner.png]
Visit this user's website Find all posts by this user
06-29-2009, 07:54 AM
Post: #5
RE: Mod-CP - Edit User & Birthday
See: http://community.mybboard.net/thread-50833.html

The suggested fix means that if a user doesn't enter a birthday, then an error appears. This error will also happen in the userCP when a user edits a profile (although haven't checked, it should do). In ./inc/datahandlers/user.php, find:

PHP Code:
// Error if a day and month exists, and the birthday day and range is not in range
if($birthday['day'] < || $birthday['day'] > 31 || $birthday['month'] < || $birthday['month'] > 12 || ($birthday['month'] == && $birthday['day'] > 29))
{
    
$this->set_error("invalid_birthday");
    return 
false;


...and replace it with:

PHP Code:
// Error if a day and month exists, and the birthday day and range is not in range
if($birthday['day'] != || $birthday['month'] != 0)
{
    if(
$birthday['day'] < || $birthday['day'] > 31 || $birthday['month'] < || $birthday['month'] > 12 || ($birthday['month'] == && $birthday['day'] > 29))
    {
        
$this->set_error("invalid_birthday");
        return 
false;
    }


That should return the modCP and edit profile (userCP) to the normal behaviour.

[Image: igG319dTu71gT.png]
Find all posts by this user
06-30-2009, 12:58 AM
Post: #6
RE: Mod-CP - Edit User & Birthday
I don't think that is a good fix. The User CP should get an error and the Mod CP shouldn't. You can check the "THIS_SCRIPT" define for "modcp.php".
Visit this user's website Find all posts by this user
06-30-2009, 08:02 AM
Post: #7
RE: Mod-CP - Edit User & Birthday
Uhm, not to be a snipe or anything, but why should moderators be able to set a birthday incorrectly? They could technically, and inadverently, still cause the original bug the fix is for.

Changing the first line:

PHP Code:
if(THIS_SCRIPT == "usercp.php" && ($birthday['day'] != || $birthday['month'] != 0)) 

[Image: igG319dTu71gT.png]
Find all posts by this user
06-30-2009, 02:16 PM
Post: #8
RE: Mod-CP - Edit User & Birthday
But I don't want to enter my birthday in User-CP, too...

[Image: banner.png]
Visit this user's website Find all posts by this user
07-06-2009, 08:45 AM
Post: #9
RE: Mod-CP - Edit User & Birthday
Unless there's any objections, I'll go with the fix I mentioned (http://community.mybboard.net/thread-520...id367631).

This means that Bug #50833 is resolved properly. As Stefen mentions, under the current "fix", a user *must* enter a birthday into their profile, so the error must only appear if the user (or mod) is entering a birthday and it is invalid (as apposed to not entering anything and still getting the error).

[Image: igG319dTu71gT.png]
Find all posts by this user
07-06-2009, 08:45 AM
Post: #10
[F] Mod-CP - Edit User & Birthday
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group

[Image: igG319dTu71gT.png]
Find all posts by this user


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication