user->notLoggedInRedirect (method)

Return to Knowledgebase

Purpose

A conditional redirect statement

Location

users/classes/User.php

Parameters

This function does not take any arguments

Example

$user->notLoggedInRedirect('users/login.php');

Further Documentation:

This method is not used in UserSpice. It can, however be useful. It's a quick way of saying if a user is not logged in, they should be redirected to a certain page. Other functions such as securePage (which will fail on private pages if a user is not logged in) and $user->isLoggedIn are probably preferable.