Last active
September 14, 2015 12:08
-
-
Save wbarcovsky/b050d60cb048a473fb2d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| public function actionAllTimeoutChange() | |
| { | |
| $companiesPath = Yii::app()->getBasePath() . '/companies/*'; | |
| $dirs = array_filter(glob($companiesPath), 'is_dir'); | |
| foreach ($dirs as $dir) { | |
| $companyName = ''; | |
| if (preg_match('/([^\/]+)$/', $dir, $matches)) { | |
| try { | |
| $companyName = $matches[1]; | |
| echo "Company `$companyName`: mailing started\n"; | |
| $this->runCommand("password timeoutChange --company=$companyName"); | |
| echo "Company `$companyName`: mailing ended\n"; | |
| } catch (Exception $e) { | |
| echo "Company `$companyName`: mailing failed\n"; | |
| echo $e->getMessage(); | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment