AuthController
class AuthController extends Controller
Implements support for our Auth controller. Functions found in this class will support tasks related to the user registration and authentication.
Properties
| protected string | $_action | The name of the current action. |
from Controller |
| protected string | $_controller | The name of the current controller. |
from Controller |
| Input | $request | Instance of Input class that performs much of our request tasks. |
from Controller |
| View | $view | Instance of view class. |
from Controller |
Methods
Constructor for the parent Controller class. This constructor gets called when an instance of the child class is instantiated.
Initializes ErrorHandler and SessionManager and starts execution of the app.
Manages the displaying of error messages and other reporting for this application.
Captures the current View instance during testing so that test assertions (e.g., assertViewContains) can access view-bound variables.
Internal version of this controller uses internal layout.
Manages login action processes.
Handles messaging and redirects for loginAction based on status of LoginResult.
Manages logoutAction for a user. It checks if a user is currently
logged. No matter of the result, the user gets redirected to the
login screen.
Manages actions related to user registration.
Lets a user whose account is flagged for a password reset set a new
password. Only works for the user recorded by
AuthService::beginPasswordReset() during login in this session.
Details
in
Controller at line 47
__construct(string $controller, string $action)
Constructor for the parent Controller class. This constructor gets called when an instance of the child class is instantiated.
in
Application at line 26
static void
appStart()
Initializes ErrorHandler and SessionManager and starts execution of the app.
in
Application at line 51
private void
_set_reporting()
Manages the displaying of error messages and other reporting for this application.
in
Controller at line 67
protected void
logViewForTesting(View $view)
Captures the current View instance during testing so that test assertions (e.g., assertViewContains) can access view-bound variables.
This method should be called in controller actions before rendering a view. It stores the View object in ApplicationTestCase::$controllerOutput['view'] when the application is running in the 'testing' environment.
at line 95
void
onConstruct()
Internal version of this controller uses internal layout.
at line 27
void
loginAction()
Manages login action processes.
at line 50
private void
loginRedirects(LoginResult $result)
Handles messaging and redirects for loginAction based on status of LoginResult.
at line 79
void
logoutAction()
Manages logoutAction for a user. It checks if a user is currently
logged. No matter of the result, the user gets redirected to the
login screen.
at line 104
void
registerAction()
Manages actions related to user registration.
at line 137
void
resetPasswordAction(int $id)
Lets a user whose account is flagged for a password reset set a new
password. Only works for the user recorded by
AuthService::beginPasswordReset() during login in this session.