View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004083 | mantisbt | sponsorships | public | 2004-07-13 16:49 | 2004-08-29 02:35 |
Reporter | vboctor | Assigned To | thraxisp | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Fixed in Version | 0.19.0rc1 | ||||
Summary | 0004083: Users without email address must not be able to sponsor issues | ||||
Description | For a user to be able to sponsor an issue the must have an email set. | ||||
Tags | No tags attached. | ||||
Attached Files | sponsor_email.diff (1,527 bytes)
Index: bug_set_sponsorship.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_set_sponsorship.php,v retrieving revision 1.1 diff -r1.1 bug_set_sponsorship.php 41,44d40 < $sponsorship = new SponsorshipData; < $sponsorship->bug_id = $f_bug_id; < $sponsorship->user_id = auth_get_current_user_id(); < $sponsorship->amount = $f_amount; 46c42,52 < sponsorship_set( $sponsorship ); --- > $t_user = auth_get_current_user_id(); > if ( is_blank( user_get_email( $t_user ) ) ) { > trigger_error( ERROR_SPONSORSHIP_ASSIGNER_NO_EMAIL, ERROR ); > }else{ > $sponsorship = new SponsorshipData; > $sponsorship->bug_id = $f_bug_id; > $sponsorship->user_id = $t_user; > $sponsorship->amount = $f_amount; > > sponsorship_set( $sponsorship ); > } Index: core/constant_inc.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/constant_inc.php,v retrieving revision 1.22 diff -r1.22 constant_inc.php 18a19 > define( 'AUTO', 2 ); 92a94 > define( 'NIS', 7 ); 248a251 > define( 'ERROR_SPONSORSHIP_ASSIGNER_NO_EMAIL', 1705 ); Index: lang/strings_english.txt =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/lang/strings_english.txt,v retrieving revision 1.187 diff -r1.187 strings_english.txt 216a217 > $MANTIS_ERROR[ERROR_SPONSORSHIP_ASSIGNER_NO_EMAIL] = 'Sponsor has not provided an email address. Please update your profile.'; | ||||