Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,13 @@
$modx->getService('lexicon','modLexicon');
$modx->log(modX::LOG_LEVEL_WARN,'Started sending emails to users with manager access...');
$mgrCtx = $modx->getObject('modContext', array('key' => 'mgr'));
$body = '<html><body> <p>hellloooooooo</p> </body></html>'; //Load lexicon and get email body and subject. //maybe check each user lexicon and load his language email.
$subject = '2-step verification is enabled';
$users = $modx->getCollection('modUser');
foreach($users as $iuser){
if(checkPolicy('frames', $mgrCtx, $iuser) ){
//Get body and subject for each user manager language
$mgrLanguage = $iuser->getOption('manager_language');
$modx->lexicon->load("$mgrLanguage:GoogleAuthenticatorX:emailtpl");
$modx->lexicon->load("GoogleAuthenticatorX:emailtpl", $mgrLanguage);
$subject = $modx->lexicon('gax.notifyemail_subject');
$body = $modx->lexicon('gax.notifyemail_body',array( 'username' => $iuser->get('username'),));
$body = '<html><body>'.$body.'</body></html>';
Expand Down
4 changes: 4 additions & 0 deletions core/components/GoogleAuthenticatorX/docs/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Changelog file for GoogleAuthenticatorX ModX extra.

GoogleAuthenticatorX 1.0.0-rc2
====================================
- Fixed sending email to users during installation i8n issue

GoogleAuthenticatorX 1.0.0-rc2
====================================
- [#1] Added setup-options (enable 2-step verification + email instructions to users with manager access)
Expand Down