Class AuthModel1
Class Controller1 All Controller Class must Extend this, Model is also extending this which means, Model Can contain Controller function as Well... The Only Different between This and Api1 class is that, Controller get validate automatically just by putting or simply call form_token() in the form field
- ServerRequest1
-
Api1
-
Controller1
-
Model1
-
AuthModel1
public static
static|boolean|
|
|
public static
array|ArrayObject|boolean|mysqli_result|null|
|
|
public static
|
|
public static
User|
|
|
public static
boolean
|
|
public static
|
|
public static
|
|
public static
|
#
getAllowedRoleLogin( array $column_role_list = ['admin'], string $column_role_name = 'role', string $on_failed_redirect_to = '/login', callable $onSuccessCallBack = null, callable $onErrorCallBack = null, string $errorMessage = 'You do not have permission to visit this page, Please login again', string $errorTitle = 'Access Denied' )
Put At the top of the Page and Specify The Required Role If Role Failed, The Page will be redirected to login page |
public static
null
|
|
public
null|string
|
|
public
null|string
|
|
public static
boolean|null|string
|
#
uploadMainFile( null $source_url = null, null $unique_file_name = null, integer $user_id = 1 )
Upload Any File to Id [Default is First User Account, which is usually Admin] |
public static
mixed
|
#
getMainFileUrl( null $file_name = null, integer $user_id = 1, string $orDemoPictureUrl = '...' )
Get Any Main Uploaded File Url or Default Demo |
public static
|
|
public static
mixed
|
isApiAuthValid()
|
callFunction(),
callFunctionByUrl()
|
public static
array
|
$FIX_COLUMN
Default Field to be included in all Auth Model |
#
['id', 'created_at', 'updated_at', 'last_login_at']
|
$EXECUTED_MESSAGE,
$FLAG_SHOW_EXEC_QUERY,
$PRIMARY_KEY_NAME,
$SQL_TIMESTAMP_FORMAT,
$SQL_VARCHAR_STRING_LENGTH,
$TABLE_NAME,
$__COLUMN_SQL_PROPERTY_LIST
|
$api_id,
$api_key
|
$request
|