Jump to content

[BUG] Apps that adds new longin methods


Go to solution Solved by Marc Stridgen,

Recommended Posts

  • Adriano Faria changed the title to [BUG] Apps that adds new longin methods

For Application.php you can use:

	/**
	 * Cleanup after saving
	 *
	 * @param	bool	$skipMember		Skip clearing member cache clearing
	 * @return	void
	 * @note	This is abstracted so it can be called externally, i.e. by the support tool
	 */
	public static function postToggleEnable( $skipMember=FALSE )
	{
		# Parent call
		parent:postToggleEnable( $skipMember );

		# Your code here
		# [...]
	}

 

Or you can also extend set_enabled():

	/**
	 * [Node] Set whether or not this node is enabled
	 *
	 * @param	bool|int	$enabled	Whether to set it enabled or disabled
	 * @return	void
	 */
	protected function set__enabled( $enabled )
	{
		# Parent call
		parent:set__enabled( $enabled );

		# Your code here
		# [...]
	}

They actually use set_enabled() to switch the application's tasks (which is what you want to do with the login handler):

		/* Update other app specific task statuses */
		\IPS\Db::i()->update( 'core_tasks', array( 'enabled' => (int) $this->enabled ), array( 'app=?', $this->directory ) );

 

Link to comment
Share on other sites

  • 2 months later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...