You should always check the example folder to see how the changes in this release can be implemented. Here are some notes with the major breaking changes:
$user = new User($username, $flarum);
anymore. Now the Flarum class will handle the user creation for you:use Maicol07\SSO\Flarum;
$flarum = new Flarum($options); // $options is an array with the required options
$user = $flarum->user($username) // Create the user if it doesn't exists with the user method
// Retrieve the user with the user method **after** its creation
$user_alias = $flarum->user(); // $user_alias contains the same object stored in $user
lifetime
option is now remember
. His behaviour is changed:remember
is a bool property and it should contain the value of the Remember me checkbox. If you want to remember the user (Flarum keeps the session active for 5 years) then set this to true
, false
otherwise (1 hour the first one. It’s renewed every time the user visits Flarum).isSessionRemembered
method (set the parameter with the new value to change/set it; to retrieve the current value call the method without any arguments).fetchUser
method of the User class has been renamed to fetch
.displayname
attribute is now read-only. Use nickname
to change the display name of a user (Doesn’t work if the Flarum Nicknames extension is disabled).getForumLink
method has been removed. You can use the url
property to get the Flarum URL.generateCookie()
method) and are no longer stored in the Flarum class (as a property);setCookie()
method has been removed. Now there are 4 new methods that replace this:
getLifeTimeSeconds
method has been removed (the lifetime
property doesn’t exists anymore)!addAddon
is now loadAddon
removeAddon
is now unloadAddon
setAddonAttributes
is now setAddonProperties
insecure
option is now verify_ssl
. Its behaviour has changed. Check the Options section below to know what you have to set to verify_ssl
.removeGroups()
method has been removed. Use Users relationships to manage groups (set to blank array to remove them).getUsersList()
method, you may want to know that this now returns a Laravel collection and no more an array.