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
Confirm Admin Password
#41
Okay and how can I use the function to pull this data? The function will use the UserSpice formula to get the page name, but how do I use this data e.g. $pagename = blah blah and check the pagename in the db and output this value to the function so I can continue? This is where I'm stuck at.
  Reply
#42
Ok. So this function assumes a column int(1) in the pages table called re_auth

http://pastebin.com/jWZQZe9x

to call it, it will be something along the lines of
<?php if (!reAuth($_SERVER['PHP_SELF'])){die();} ?>

or maybe just
reAuth($_SERVER['PHP_SELF']);

  Reply
#43
I got this working with a bit of changes, only issues is I am getting this error in my nav:
Code:
Notice: Undefined property: stdClass::$private in /home/aircentralized/public_html/boss/usersc/includes/custom_functions.php on line 43

This appears to be because of the
Code:
'private' => $results->private
in the $pageDetails section

Function:
https://hastebin.com/boqixiwono.php

Called by:
Code:
<?php if (!reAuth($_SERVER['PHP_SELF'],$user->data()->id)) ?>
  Reply
#44
Try changing that to
Code:
$pageDetails = array( 'id' =>$results->id, 'page' => $results->page, 're_auth' => $results->re_auth);
  Reply
#45
This has replicated it. Thank you so much!

https://hastebin.com/nuhenotolu.php
  Reply
#46
Awesome! Glad it worked.
  Reply
#47
I'm trying to dupe the "Private or Public" section for re_auth, but it is not built in to fetchPageDetails, obviously, how can I go about doing this and replicating this error?

Notice: Undefined property: stdClass::$re_auth in /home/aircentralized/public_html/boss/usersc/admin_page.php on line 185

---

I replicated this by making a new function:
https://hastebin.com/inuvequpix.php
  Reply
#48
Can you send me a hastebin of the full file that has the error on line 185?
  Reply
#49
I was able to fix this using the new haste I posted, I had edited it afterwards, sorry!
  Reply
#50
In case anyone wants to deploy this or @Mudmin wants to include it in alpha:

Code:
adminverify.php
https://pastebin.com/LvTPwTwA

Code:
admin_page.php
add after private page setting:
https://pastebin.com/hfgjWYRz
And the HTML (I put under Private):
https://pastebin.com/uDJvwi0i

Custom Functions:
https://pastebin.com/QSkHNsc4

DB alters:
Add colum re_auth to pages table int 1 default 0

I think thats all! If you run into any issues let me know!

  Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)