How SugarCRM Display Login Page

The purpose of this article is to show the related architectures inside SugarCRM application in processing the middle part of the page after the header at the start of the application. The login page:


The Login display is processed by SugarCRM via override-able display method of view Object, called ViewClassic.

The login dialog box itself is in the middle location after the header.

ViewClassic is build from ‘View’ and $type variable which evaluates to ViewClassic. The $type is determined by SugarController class (Sugarcontroller.php). The default value of $type, i.e. at the start of application will be ‘classic’.

The task to actually creates the view object is done by ViewFactory class via loadView method. The loadView method will search for the existing directories as follows to create the view object:


Unless there are customized view defined by the local application developer, Usually it will end at the last or default location of SugarCRM application.

Note that the Users is $module name, and at the first time (login phase), it will contains Users, as evidenced from the URL index.php?action=Login&module=Users.

Here is the prototype inside view.classic.php class declaration:

class ViewClassic extends SugarView

In this case, any other methods that is not defined in this class, will be handle in the parent class, for example, the displayHeader method and the method for handling the footer display (displayFooter).

Since the ViewClassic is pretty generic, now the question is, how does the class is acknowledged to show the Login page ?

This is done by SugarController::getActionFilename by supplying the action parameter, which is ‘Login’ string.

By combining the action and module parameter, this method will try to find:


If there are no custom made login.php screen, it will end up at the last location supplied by SugarCRM application.

After that, it will call parents includeClassicFile method, and the transfer will be overtaken by Login.php routines.

As usual, for customization of login page, you can start with login.tpl and parts of login.php codes for displaying the page.


One Response to “How SugarCRM Display Login Page”

  1. progressive car insurance Says: – cheap car insurance
    cheap auto insurance
    progressive car insurance

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: