cwmiller / broadworks-connector

Simple library for connecting to BroadWorks OCI-P API
MIT License
8 stars 5 forks source link

change login function #20

Closed xciser77 closed 5 years ago

xciser77 commented 5 years ago

First thank you for the great connector software.

I would like to propose a change for the login function. Could you change the last bit of the login fucntion to not only set the loggedin var but also to return the login value if the login was succesful: else { $this->loggedIn = true; return $loginResponse; }

In the reponse value is the serviceprovider id etc to with this you can program the script to get the spid automatically instead of program it hardcoded.

xciser77 commented 5 years ago

or is there an other way the get the serviceprovider ID after the login command ?

cwmiller commented 5 years ago

Version 2.1.0 has been released with this feature added. The login method now returns a UserDetails object containing information about the user. This object can also be retrieved by calling the OcipClient::getUserDetails method.