mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
FIX: phpBB3 importer should ignore invalid birthdates
This commit is contained in:
parent
af7d51e923
commit
a3afdba59e
1 changed files with 2 additions and 1 deletions
|
@ -68,7 +68,8 @@ module ImportScripts::PhpBB3
|
|||
|
||||
def parse_birthdate(row)
|
||||
return nil if row[:user_birthday].blank?
|
||||
Date.strptime(row[:user_birthday].delete(' '), '%d-%m-%Y') rescue nil
|
||||
birthdate = Date.strptime(row[:user_birthday].delete(' '), '%d-%m-%Y') rescue nil
|
||||
birthdate && birthdate.year > 0 ? birthdate : nil
|
||||
end
|
||||
|
||||
# Suspends the user if it is currently banned.
|
||||
|
|
Loading…
Reference in a new issue