Using a user profile field possible?

Using a user profile field possible?

by Frank B -
Number of replies: 1
I was wondering if could use a user profile field for the logged-in session in a yii app.

The idea is for the logged in user to be able to consult his payments in the universities system. The staff would fill-in a user profile field with the users ID number in the schools payment system and the yii app would use the profile field number to run the query on the billing table for the users last 10 payments.


I'm sure there must be a guide already written on this. I'm sure I'm not the first person who would like to use moodle variable in other applications.

Average of ratings: -
In reply to Frank B

Re: Using a user profile field possible?

by Jez H -

The way we approach this is to use SSO (Single Sign On), you could look at SAML for which there is a Moodle plugin already (I have never tested it).

https://simplesamlphp.org/

When our users login we put additional info into the Moodle session, and because they are logged via a central system (SSO / CAS) we can embed elements from other systems using jQuery or something else. For example, we show students a "universal toolbar" in the header of multiple applications which shows number of unread emails, calendar, printer credits, library fines etc. Clicking these notifications takes users to the relevant system where they are automatically logged in and taken to the relevant page.

I know that is not what you were asking, is a lot more work / longer term but once you have something like that you have a lot more options and it is a much easier process...  I just thought I would mention it smile