Lines 193-201
sub store {
Link Here
|
193 |
$self->trim_whitespaces; |
193 |
$self->trim_whitespaces; |
194 |
|
194 |
|
195 |
# We don't want invalid dates in the db (mysql has a bad habit of inserting 0000-00-00) |
195 |
# We don't want invalid dates in the db (mysql has a bad habit of inserting 0000-00-00) |
196 |
$self->dateofbirth(undef) unless $self->dateofbirth; |
196 |
$self->dateofbirth(undef) unless $self->dateofbirth; |
197 |
$self->debarred(undef) unless $self->debarred; |
197 |
$self->debarred(undef) unless $self->debarred; |
198 |
$self->date_renewed(undef) unless $self->date_renewed; |
198 |
$self->date_renewed(undef) unless $self->date_renewed; |
|
|
199 |
$self->lastseen(undef) unless $self->lastseen; |
200 |
$self->updated_on(undef) unless $self->updated_on; |
199 |
|
201 |
|
200 |
# Set default values if not set |
202 |
# Set default values if not set |
201 |
$self->sms_provider_id(undef) unless $self->sms_provider_id; |
203 |
$self->sms_provider_id(undef) unless $self->sms_provider_id; |
Lines 204-209
sub store {
Link Here
|
204 |
# If flags == 0 or flags == '' => no permission |
206 |
# If flags == 0 or flags == '' => no permission |
205 |
$self->flags(undef) unless $self->flags; |
207 |
$self->flags(undef) unless $self->flags; |
206 |
|
208 |
|
|
|
209 |
# tinyint or int |
210 |
$self->gonenoaddress(0) unless $self->gonenoaddress; |
211 |
$self->login_attempts(0) unless $self->login_attempts; |
212 |
$self->privacy_guarantor_checkouts(0) unless $self->privacy_guarantor_checkouts; |
213 |
|
207 |
unless ( $self->in_storage ) { #AddMember |
214 |
unless ( $self->in_storage ) { #AddMember |
208 |
|
215 |
|
209 |
# Generate a valid userid/login if needed |
216 |
# Generate a valid userid/login if needed |
210 |
- |
|
|