Conditions | 3 |
Paths | 3 |
Total Lines | 19 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | protected function command() { |
||
22 | |||
23 | |||
24 | if (!class_exists('\Faker\Generator')) { |
||
25 | elgg_log('This is a developer tool currently intended for testing purposes only. Please refrain from using it.', 'ERROR'); |
||
26 | return 1; |
||
27 | } |
||
28 | |||
29 | set_time_limit(0); |
||
30 | |||
31 | if (elgg_is_logged_in()) { |
||
32 | elgg_log("Seeds should not be run with a logged in user", 'ERROR'); |
||
33 | return 2; |
||
34 | } |
||
35 | |||
36 | _elgg_services()->setValue('mailer', new \Zend\Mail\Transport\InMemory()); |
||
37 | |||
38 | _elgg_services()->seeder->seed(); |
||
39 | } |
||
40 | |||
41 | } |