- $user = common_current_user();
-
- if (Event::handle('StartEmailSaveForm', array($this, &$user))) {
- $emailnotifysub = $this->boolean('emailnotifysub');
- $emailnotifyfav = $this->boolean('emailnotifyfav');
- $emailnotifymsg = $this->boolean('emailnotifymsg');
- $emailnotifynudge = $this->boolean('emailnotifynudge');
- $emailnotifyattn = $this->boolean('emailnotifyattn');
- $emailmicroid = $this->boolean('emailmicroid');
- $emailpost = $this->boolean('emailpost');
-
- assert(!is_null($user)); // should already be checked
-
+ if (Event::handle('StartEmailSaveForm', array($this, $this->scoped))) {
+ $emailnotifysub = $this->booleanintstring('emailnotifysub');
+ $emailnotifymsg = $this->booleanintstring('emailnotifymsg');
+ $emailnotifynudge = $this->booleanintstring('emailnotifynudge');
+ $emailnotifyattn = $this->booleanintstring('emailnotifyattn');
+ $emailpost = $this->booleanintstring('emailpost');
+
+ $user = $this->scoped->getUser();