checkAdminAuthentication() public static method

If user is not, then he will be redirected to login page and the application is hard-stopped via exit(). Using this method makes only sense in controllers that should only be used by admins.
public static checkAdminAuthentication ( )
 /**
  * Construct this object by extending the basic Controller class
  */
 public function __construct()
 {
     parent::__construct();
     // special authentication check for the entire controller: Note the check-ADMIN-authentication!
     // All methods inside this controller are only accessible for admins (= users that have role type 7)
     Auth::checkAdminAuthentication();
 }
Example #2
0
 /**
  * @function __construct
  * @public
  * @returns NONE
  * @desc Constructs AdminController object by extending the basic Controller class. Checks for the proper admin authentication for entire controller. All methods inside this controller are only accessible for admin users (users of role type/level 7).
  * @param NONE
  * @example NONE
  */
 public function __construct()
 {
     parent::__construct();
     Auth::checkAdminAuthentication();
 }
 public function deletePhotoMaterial_action($material_id)
 {
     // All methods inside this controller are only accessible for admins (= users that have role type 7)
     Auth::checkAdminAuthentication();
     MaterialModel::deletePhotoMaterial($material_id);
     Redirect::to('material/index/0');
 }