| 1588 | | return 1 if ( $pref ne 'MT' ); |
|---|
| 1589 | | if ( !$app->param('id') ) { # it's a new object |
|---|
| 1590 | | return $eh->error( $app->translate("User requires password") ) |
|---|
| 1591 | | if ( !$app->param('pass') ); |
|---|
| 1592 | | return $eh->error( |
|---|
| 1593 | | $app->translate("User requires password recovery word/phrase") ) |
|---|
| 1594 | | if ( !$app->param('hint') ); |
|---|
| 1595 | | } |
|---|
| 1596 | | return $eh->error( |
|---|
| 1597 | | MT->translate("Email Address is required for password recovery") ) |
|---|
| 1598 | | unless $app->param('email'); |
|---|
| 1599 | | if ( $app->param('url') ) { |
|---|
| 1600 | | my $url = $app->param('url'); |
|---|
| 1601 | | return $eh->error( MT->translate("Website URL is imperfect") ) |
|---|
| 1602 | | unless is_url($url); |
|---|
| 1603 | | } |
|---|
| | 1601 | } |
|---|
| | 1602 | |
|---|
| | 1603 | return 1 if ( $pref ne 'MT' ); |
|---|
| | 1604 | if ( !$app->param('id') ) { # it's a new object |
|---|
| | 1605 | return $eh->error( $app->translate("User requires password") ) |
|---|
| | 1606 | if ( !$app->param('pass') ); |
|---|
| | 1607 | return $eh->error( |
|---|
| | 1608 | $app->translate("User requires password recovery word/phrase") ) |
|---|
| | 1609 | if ( !$app->param('hint') ); |
|---|
| | 1610 | } |
|---|
| | 1611 | return $eh->error( |
|---|
| | 1612 | MT->translate("Email Address is required for password recovery") ) |
|---|
| | 1613 | unless $app->param('email'); |
|---|
| | 1614 | if ( $app->param('url') ) { |
|---|
| | 1615 | my $url = $app->param('url'); |
|---|
| | 1616 | return $eh->error( MT->translate("Website URL is imperfect") ) |
|---|
| | 1617 | unless is_url($url); |
|---|