Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require_once 'sign_up.php';
- function callback_func($admin) {
- require_once ($_SERVER['DOCUMENT_ROOT'] . '/settings/index.php');
- }
- spl_autoload_register('callback_func');
- $all_users = unserialize(file_get_contents($_SERVER['DOCUMENT_ROOT'] . '/settings/all_users.php'));
- class pageOwner {
- static $instance;
- static $username = $GLOBALS['username'];
- static function assignStatic() {
- if (is_null(self::$instance)) {
- foreach($GLOBALS['all_users'] as $user) { /* this loop should check where the array for where the new object matches, fetch that object then store it in the instance static variable */
- if ($user->username == $username) {
- return self::$instance = $user;
- }
- }
- }
- }
- }
- pageOwner::assignStatic();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement