The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/printthread.php(287) : eval()'d code 2 errorHandler->error
/printthread.php 287 eval
/printthread.php 117 printthread_multipage



UserSpice
Confirm Admin Password - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Miscellaneous (https://userspice.com/forums/forumdisplay.php?fid=28)
+--- Forum: Modifications and Hackery (https://userspice.com/forums/forumdisplay.php?fid=29)
+--- Thread: Confirm Admin Password (/showthread.php?tid=427)

Pages: 1 2 3 4 5 6


Confirm Admin Password - Brandin - 03-11-2017

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.


Confirm Admin Password - mudmin - 03-11-2017

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']);




Confirm Admin Password - Brandin - 03-11-2017

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)) ?>



Confirm Admin Password - mudmin - 03-11-2017

Try changing that to
Code:
$pageDetails = array( 'id' =>$results->id, 'page' => $results->page, 're_auth' => $results->re_auth);



Confirm Admin Password - Brandin - 03-11-2017

This has replicated it. Thank you so much!

https://hastebin.com/nuhenotolu.php


Confirm Admin Password - mudmin - 03-11-2017

Awesome! Glad it worked.



Confirm Admin Password - Brandin - 03-11-2017

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


Confirm Admin Password - mudmin - 03-11-2017

Can you send me a hastebin of the full file that has the error on line 185?



Confirm Admin Password - Brandin - 03-11-2017

I was able to fix this using the new haste I posted, I had edited it afterwards, sorry!


Confirm Admin Password - Brandin - 08-05-2017

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!