The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need ability to approve new user
#6
You could use
Code:
checkPermission()
or
Code:
checkMenu()
from us_helpers.php, and when they don't have permission you can
Code:
Redirect::to('payments.php')
(or whatever your payment pay is called). This will redirect anyone without the STUDENT permission to your payment page.

Code:
//When placed before securePage() this will redirect to your custom page
Code:
if (!checkPermission($studentPermissionId)){Redirect::to('payments.php');}
Code:
// If placed before checkPermission() this will redirect to account.php
Code:
// when logged in or login.php if not, but doesn't send them to
Code:
// your custom payment page
Code:
if (!securePage($_SERVER['PHP_SELF'])){die();}
Code:
echo 'Hello Student, you have permission to view this course.';

I use a customer permissions system so there may be a more optimum way for you to do this but give it a shot and see if it works for you.
  Reply


Messages In This Thread
Need ability to approve new user - by joelmalach - 07-31-2017, 03:04 PM
Need ability to approve new user - by dan - 07-31-2017, 03:16 PM
Need ability to approve new user - by dan - 07-31-2017, 03:26 PM
Need ability to approve new user - by joelmalach - 07-31-2017, 04:02 PM
Need ability to approve new user - by joelmalach - 07-31-2017, 06:06 PM
Need ability to approve new user - by karsen - 07-31-2017, 06:36 PM
Need ability to approve new user - by joelmalach - 08-01-2017, 07:34 AM
Need ability to approve new user - by joelmalach - 08-02-2017, 08:47 AM
Need ability to approve new user - by firestorm - 08-02-2017, 07:28 PM
Need ability to approve new user - by joelmalach - 08-03-2017, 08:59 AM
Need ability to approve new user - by mudmin - 08-03-2017, 01:20 PM
Need ability to approve new user - by joelmalach - 08-03-2017, 02:56 PM
Need ability to approve new user - by mudmin - 08-03-2017, 02:58 PM
Need ability to approve new user - by firestorm - 08-03-2017, 05:42 PM
Need ability to approve new user - by mudmin - 08-03-2017, 05:48 PM
Need ability to approve new user - by Brandin - 08-03-2017, 11:08 PM
Need ability to approve new user - by joelmalach - 08-04-2017, 04:26 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)