General developer forum

Get the logged user ID from external page

 
Picture of michael latif
Get the logged user ID from external page
 

i  build a login page with username and password fields which i will post them to login page for moodle to check the account and login the user , after that redirect the user to a dashboard ( external page ) . what i need is to get the user data in this dashboard ( at least user ID ) . How can i get the userID (at least ) from external page ?


Thanks in advance 

 
Average of ratings: -
Picture of Conn Warwicker
Re: Get the logged user ID from external page
Core developersParticularly helpful MoodlersPlugin developers

Hi,

Is this a separate, external login page, which just posts to the url moodle/login/index.php ?

Or is it a custom built login which you've set up your own database queries / code for, to check the authentication?


 
Average of ratings: -