Previous topic

Login

Next topic

Phpinfo

This Page

Motd

Displays text banners typically before and after login

Syntax

motd [type]

Purpose

Displays

See also

For examples of how to use this command, see Examples below.

Parameters

Arguments

type

A message of one of the following types:

prelogin

Message displayed when the console is first loaded. This is the default.

This message my be set with the site.banner config value.

post

Message displayed once a user has logged in to the console.

This message may be set with the site.banner.post config value.

Examples

Default Operation

Simply display the prelogin banner:

}motd

Tip

This is the same as typing motd prelogin

Nominal Operation

fooo

Remarks

Its motd. And does what it says on the tin.

You may notice that this cmdlet is one of only two (the other one is `cmdlets\\login`_ ) that can be run without logging in. This is because motd actually has a property flag on it allowing it to be executed without an authenticated user.

<?php
//snip

 class motdCmdlet extends WaccSystem\Cmdlet
 {
     /**
      * @var bool Tells wacc that this cmdlet can be run by anonymous users
      */
     const ALLOW_ANON=true;

     public function configure()
     {

 //snip

Clearly without this flag the MoTD banner could not be shown as it is displayed before the prompt is.

See also

See `extending`_ for more information on creating cmdlets and `security`_ for the implications of anonymous access