form after login like for changeme password

form after login like for changeme password

by michele marostica -
Number of replies: 11
Hi, I'm working on moodle for my university in padova, and I need a form with some infos after login like the one that appear if my pass is "changeme".

Can someone give me an advice to do this? Thaks a lot!
Average of ratings: -
In reply to michele marostica

Re: form after login like for changeme password

by michele marostica -
nobody can help me? sad
In reply to michele marostica

Re: form after login like for changeme password

by Frank Ralf -
Hi Michele,

Could you describe a bit more detailed what you want to achieve?

tia
Frank
In reply to Frank Ralf

Re: form after login like for changeme password

by michele marostica -
Yes sure, we are doing a migration to an SSO authentication method with Shibbolet and the user account will be updated only if the user choice the SSO login. So if he select the manual login, he has never logged in with SSO and he has got the right email domain '@unipd.it' or '@studenti.unipd.it'; a form has to appear that recommend the user to use SSO authentication method instead of manual and a link to do it.

I hope to be clear in my intention. My problem is to understand how can I make a form after the login.
Thanks a lot!

Michele
In reply to michele marostica

Re: form after login like for changeme password

by Frank Ralf -
Thanks for the clarification!

Just some ideas:

Why don't you do it the other way round? Recommend SSO authentification on your login page _before_ manual login? If I understand correctly the students won't be able to login manually (without their SSO user data) anyhow.

You might also have look at Integration FAQ for some pointers on APIs and SSO for Moodle.

hth
Frank
In reply to Frank Ralf

Re: form after login like for changeme password

by michele marostica -
Thanks for the answer, I already made a login page that recommend SSO (https://moodle.cca.unipd.it/moodle_test/login/index.php don't know if you have access to this page but try smile ) but my boss tell me to do another page (maybe just to see me work on something else :P).
In reply to michele marostica

Re: form after login like for changeme password

by Frank Ralf -
I'm no developer but you might find some useful information in one of these releated forum discussions (the question seems to creep up every now and then but not very many solutions... ).

Here are the login related discussions from the General Developer forum.

You could also have a look at the relevant login source code whether you can add your code there (that should at least keep you busy if your boss asks ...).

hth
Frank

PS
Your site is not accessible for non authorized external users.
In reply to Frank Ralf

Re: form after login like for changeme password

by michele marostica -
Ok, thanks a lot for your help!

Michele
In reply to michele marostica

Re: form after login like for changeme password

by Frank Ralf -
I did some more poking in the source code...

authlib.php provides a loginpage_hook() method: "Hook for overriding behavior of login page."

hth
Frank
In reply to Frank Ralf

Re: form after login like for changeme password

by michele marostica -
thanks for the answer, I have to study how it works becouse I think that the method is already overridden by my SSO auth login plugin... But maybe I can do it.
Thanks!


Michele
In reply to michele marostica

Re: form after login like for changeme password

by Hubert Chathi -
I'm not sure if I understand your issue correctly, but... One thing that the OpenID plugin does is it provides a block that, among other things, provides a form that allows non-OpenID users to convert their account to OpenID. You can then put that block on the front page, so that users will see it when they log in. Perhaps doing something like that might work for your needs, and might be easier?
In reply to Hubert Chathi

Re: form after login like for changeme password

by michele marostica -
Yes is a similar problem and maybe I find something that help me... Thanks a lot. Tomorrow at work I'll take it a look.


Michele