Jump to content

Mr World

Members
  • Posts

    45
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Mr World's Achievements

  1. In forum/admin/?app=core&module=bulkmail&controller=bulkmail&do=preview&id=27 How do I go about updating this to threads I want?
  2. I keep getting runesuite.io redirected you too many times. Even though the PHP version is 8.1.
  3. mass delete avatars and set default avatars for all?
  4. here is the class that communicates with the InvisionAPI. It has been curated to avoid any sensitive info exposed <?php /** * Here is the full class that communicates with the InvisionAPI * */ class InvisionAPI { private static $instance; public static function getInstance() { if (self::$instance == null) { self::$instance = new InvisionAPI(); } return self::$instance; } private $settings; private $database; private $session; public function __construct() { $this->refreshSession(); $this->session = \IPS\Session\Front::i(); $this->database = \IPS\Db::i(); $this->settings = \IPS\Settings::i(); } /** * Refreshes our IPS session, if we ever had one. * Required if for some reason our session has timed out and we have yet to revisit the suite. */ public function refreshSession() { $this->requireIPS(); \IPS\Session\Front::i(); } public function isGuest($member) { return $member->member_group_id == $this->settings->guest_group; } /** * Returns the current logged in user * This method is called when I access after login form, it always returns Guest! * @return null */ public function getCachedMember() { $this->refreshSession(); $member = \IPS\Member::loggedIn(); if ($this->isGuest($member)) { return null; } return new InvisionMember($member); } public function loadMember($username) { $member = \IPS\Member::load($username, 'name'); if ($this->isGuest($member)) { return null; } return $member; } /** * This returns true when user/pass is OK so I know it works! */ public function login($username, $password, $rememberMe = false) { $member = $this->loadMember($username); if ($member == null) { return null; } if (!$this->verifyPassword($member, $password)) { return false; } $this->setSession($member, $rememberMe); return true; } public function logout() { $member = $this->getCachedMember(); if ($member == null) { return; // We are already logged out } session_destroy(); \IPS\Request::i()->clearLoginCookies(); $member->memberSync('onLogout', array(\IPS\Http\Url::internal(''))); } /** * Sets the user session after use has been verified. * @param $member * @param $rememberMe */ public function setSession($member, $rememberMe) { $this->session->setMember($member); $device = \IPS\Member\Device::loadOrCreate($member); $member->last_visit = $member->last_activity; $member->save(); $device->anonymous = false; $device->updateAfterAuthentication($rememberMe, null); $member->memberSync('onLogin'); $member->profileSync(); /** * If I do a test here, it fails, I get guest! * $member = \IPS\Member::loggedIn(); */ } public function verifyPassword($member, $password) { return password_verify($password, $member->members_pass_hash) === true; } private function requireIPS() { require_once FORUM_PATH . 'init.php'; } }
  5. A bit of API testing first to know it's working: \IPS\Member::load('some_username', 'name'); //works as expected, I get the user \IPS\Member::load($member_id, 'member_id'); //works as expected, I get the user Authenticating a user via the API: $session = \IPS\Session\Front::i(); $session->setMember($member); $member = \IPS\Member::load('username', 'name'); $device = \IPS\Member\Device::loadOrCreate($member); $device->anonymous = false; $device->updateAfterAuthentication($rememberMe, null); $member->memberSync('onLogin'); $member->profileSync(); At this point, if I visit the forum, I see that I am logged in as the user so the authentication works. But, if I do a $member = \IPS\Member::loggedIn(); I get guest, regardless if I do the call right after authentication or after page refresh. Any idea on what am I missing here?
  6. Turns out (BIM) Hide Link And Code plugin is slightly broken. Sigh.
  7. I can't log into the admin control forums to disable it how to disable all plugins via PHP likely in constants or conf_global?
  8. Declaration of IPS\\forums\\Topic\\hook648::truncated($oneLine = false) must be compatible with IPS\\_Content::truncated($oneLine = false, $length = 500) in /home/runesu/public_html/init.php(902) : eval()'d code on line 240
  9. Went into /public_html/applications deleted the directory links seems to of solved my issues.
  10. Cause I can't go into upgrade and add the license... I uploaded this brand new as well all old files replaced, what to do?
  11. Why don't we have a discord? A lot of hosting companies and major games have it. Why can't we?
  12. home/runesu/public_html/applications/links/sources/Link/Link.php on line 1569, referer: https://runesuite.io/admin/upgrade/?controller=upgrade&key= [Wed Sep 29 13:30:06.492184 2021] [:error] [pid 13639:tid 139695933540096] [client 156.146.34.35:57468] PHP Fatal error: Declaration of IPS\\links\\_Link::contentImages($limit = null) must be compatible with IPS\\Content\\_Item::contentImages($limit = null, $ignorePermissions = false) in /home/runesu/public_html/applications/links/sources/Link/Link.php on line 1569, referer: https://runesuite.io/admin/upgrade/?controller=upgrade&key= Any ideas on this at all?
  13. array_keys(): Argument #1 ($array) must be of type array, null given
×
×
  • Create New...