@@ -33,10 +33,10 @@ discard block |
||
| 33 | 33 | $data['email'] = $user->email(); |
| 34 | 34 | $data['emailpublic'] = $user->emailpublic() == true ? "Yes" : "No"; |
| 35 | 35 | $data['optin'] = $user->optin() == true ? "Yes" : "No"; |
| 36 | - $data['postcode'] = $user->postcode(); |
|
| 36 | + $data['postcode'] = $user->postcode(); |
|
| 37 | 37 | $data['website'] = $user->url(); |
| 38 | - $data['registrationtime'] = $user->registrationtime(); |
|
| 39 | - $data['status']= $user->status(); |
|
| 38 | + $data['registrationtime'] = $user->registrationtime(); |
|
| 39 | + $data['status'] = $user->status(); |
|
| 40 | 40 | $data["deleted"] = $user->deleted(); |
| 41 | 41 | $data["confirmed"] = $user->confirmed(); |
| 42 | 42 | $data["status"] = $user->status(); |
@@ -243,10 +243,10 @@ discard block |
||
| 243 | 243 | // Who are we updating? $THEUSER or someone else? |
| 244 | 244 | if ($this_page == "otheruseredit") { |
| 245 | 245 | $who = 'the user’s'; |
| 246 | - $success = $THEUSER->update_other_user ( $details ); |
|
| 246 | + $success = $THEUSER->update_other_user($details); |
|
| 247 | 247 | } else { |
| 248 | 248 | $who = 'your'; |
| 249 | - $success = $THEUSER->update_self ( $details ); |
|
| 249 | + $success = $THEUSER->update_self($details); |
|
| 250 | 250 | } |
| 251 | 251 | |
| 252 | 252 | |
@@ -278,12 +278,12 @@ discard block |
||
| 278 | 278 | // If this goes well, the user will have their data |
| 279 | 279 | // added to the database and a confirmation email |
| 280 | 280 | // will be sent to them. |
| 281 | - $success = $THEUSER->add ( $details ); |
|
| 281 | + $success = $THEUSER->add($details); |
|
| 282 | 282 | |
| 283 | 283 | $errors = array(); |
| 284 | 284 | |
| 285 | 285 | if (!$success) { |
| 286 | - $errors["db"] = "Sorry, we were unable to create an account for you. Please <a href=\"mailto:". str_replace('@', '@', CONTACTEMAIL) . "\">let us know</a>. Thanks."; |
|
| 286 | + $errors["db"] = "Sorry, we were unable to create an account for you. Please <a href=\"mailto:" . str_replace('@', '@', CONTACTEMAIL) . "\">let us know</a>. Thanks."; |
|
| 287 | 287 | } |
| 288 | 288 | |
| 289 | 289 | return $errors; |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | |
| 292 | 292 | public function getRep($cons_type, $mp_house) { |
| 293 | 293 | global $THEUSER; |
| 294 | - if ( !$THEUSER->has_postcode() ) { |
|
| 294 | + if (!$THEUSER->has_postcode()) { |
|
| 295 | 295 | return array(); |
| 296 | 296 | } |
| 297 | 297 | |
@@ -304,11 +304,11 @@ discard block |
||
| 304 | 304 | // Scottish homepage |
| 305 | 305 | try { |
| 306 | 306 | $constituencies = \MySociety\TheyWorkForYou\Utility\Postcode::postcodeToConstituencies($THEUSER->postcode()); |
| 307 | - if ( isset($constituencies[$cons_type]) ) { |
|
| 307 | + if (isset($constituencies[$cons_type])) { |
|
| 308 | 308 | $constituency = $constituencies[$cons_type]; |
| 309 | 309 | $MEMBER = new Member(array('constituency'=>$constituency, 'house'=> $mp_house)); |
| 310 | 310 | } |
| 311 | - } catch ( MemberException $e ) { |
|
| 311 | + } catch (MemberException $e) { |
|
| 312 | 312 | return array(); |
| 313 | 313 | } |
| 314 | 314 | |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | $mreg = array(); |
| 346 | 346 | if ($THEUSER->isloggedin() && $THEUSER->postcode() != '' || $THEUSER->postcode_is_set()) { |
| 347 | 347 | $reps = \MySociety\TheyWorkForYou\Member::getRegionalList($THEUSER->postcode, $mp_house, $cons_type); |
| 348 | - foreach ( $reps as $rep ) { |
|
| 348 | + foreach ($reps as $rep) { |
|
| 349 | 349 | $member = new \MySociety\TheyWorkForYou\Member(array('person_id' => $rep['person_id'])); |
| 350 | 350 | $mreg[$rep['person_id']] = $this->constructMPData($member, $THEUSER, $mp_house); |
| 351 | 351 | } |