-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updating users app to user sendEvent Method when sending emails, and …
…to use previewers
- Loading branch information
1 parent
3473b4a
commit 942b2b4
Showing
2 changed files
with
58 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,4 +116,59 @@ public function registerEmails($event) | |
{ | ||
\Dsc\System::instance()->addMessage('Users added its admin menu items.'); | ||
} | ||
|
||
public function mailerPreviewUsersVerify_change_email($event) { | ||
|
||
$options = []; | ||
|
||
$options['user'] = ['first_name'=> 'John', 'last_name' => 'Doe', 'email' => '[email protected]']; | ||
$options['link'] = \Dsc\Url::base() . 'user/change-email/confirm?new_email&previewview'; | ||
$options['token'] = new \MongoId(); | ||
|
||
|
||
$event->setArgument('variables', $options); | ||
} | ||
|
||
public function mailerPreviewUsersPassword_reset_request($event) { | ||
|
||
$options = []; | ||
|
||
$options['user'] = ['first_name'=> 'John', 'last_name' => 'Doe', 'email' => '[email protected]', 'forgot_password' => ['token' => new \MongoId()]]; | ||
$options['link'] = \Dsc\Url::base() . 'user/change-email/confirm?new_email&previewview'; | ||
$options['token'] = new \MongoId(); | ||
|
||
|
||
$event->setArgument('variables', $options); | ||
} | ||
|
||
public function mailerPreviewUsersValidate_email($event) { | ||
|
||
$options = []; | ||
|
||
$options['user'] = ['id' => new \MongoId(),'first_name'=> 'John', 'last_name' => 'Doe', 'email' => '[email protected]', 'forgot_password' => ['token' => new \MongoId()]]; | ||
$options['link'] = \Dsc\Url::base() . 'user/change-email/confirm?new_email&previewview'; | ||
$options['token'] = new \MongoId(); | ||
|
||
|
||
$event->setArgument('variables', $options); | ||
} | ||
|
||
public function mailerPreviewUsersPassword_reset_notification($event) { | ||
|
||
$options = []; | ||
|
||
$options['user'] = ['id' => new \MongoId(),'first_name'=> 'John', 'last_name' => 'Doe', 'email' => '[email protected]', 'forgot_password' => ['token' => new \MongoId()]]; | ||
$options['link'] = \Dsc\Url::base() . 'user/change-email/confirm?new_email&previewview'; | ||
$options['token'] = new \MongoId(); | ||
|
||
|
||
$event->setArgument('variables', $options); | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters