inheriting from Com...
 
Notifications
Clear all

inheriting from Combu.User problem

3 Posts
2 Users
0 Likes
542 Views
(@cperisson)
Posts: 2
New Member
Topic starter
 
Hi
 
Following the examples in the documentation, I have created a custom user clase  MyCustomUserClass() inheriting from Combu.user, so we can use the appCustomdata feature. Our class works fine, with an exception: when you log using user+password all works well, but if we log using the Autologin feature, we can’t cast from CombuManager.localUser to our MyCustomUserClass:
MyCustomUserClass user= CombuManager.localUser as MyCustomUserClass; // this give a null cast in "user" if you have login with Autologin, but works ok with user+pass login

Some help?  Thanks in advance 🙂

 
Posted : 24/07/2019 2:58 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

You can pass the type to Autologin just like you do with Authenticate, there an overload:

User.AutoLogin<MyCustomUserClass>(...);

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 27/07/2019 11:37 am
(@cperisson)
Posts: 2
New Member
Topic starter
 

@skaredcreations

it works perfect! thanks for your valuable help 🙂

 
Posted : 01/08/2019 6:36 pm
Share: