We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 75ff5cc commit 85906f9Copy full SHA for 85906f9
1 file changed
admin-tools-command.php
@@ -20,11 +20,17 @@
20
EE::add_command( 'admin-tools', 'Admin_Tools_Command' );
21
22
23
-EE::add_hook('before_invoke:admin-tools up', function ( $args, $assoc_args ) {
24
-
+EE::add_hook('before_invoke:admin-tools up', 'init_global_auth' );
+
25
+/**
26
+ * Initialize global auth if it's not present.
27
+ *
28
+ * @throws \EE\ExitException
29
+ */
30
+function init_global_auth() {
31
if ( ! is_array( EE::get_runner()->find_command_to_run( [ 'auth' ] ) ) ) {
- EE::error( 'Auth command needs to be registered for admin_tools' );
32
+ EE::error( 'Auth command needs to be registered for mailhog' );
33
}
34
35
EE::run_command( [ 'auth', 'init' ] );
-});
36
+}
0 commit comments