Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

User:Ratana Lim: Difference between revisions

From MoodleDocs
(User Account Needs Refactoring)
 
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 3: Line 3:
Here is the problem I've been battling over the years with Moodule user account design:  The same person have multiple accounts on Moodle user table depending on the authentication method.  Here is an example.
Here is the problem I've been battling over the years with Moodule user account design:  The same person have multiple accounts on Moodle user table depending on the authentication method.  Here is an example.


| id | firstname | lastname | email | usrname | auth | idnumber | |
| id   | firstname | lastname | email             | usrname     | auth       | idnumber |
|1000  | Ratana | Lim | ratana@ucsb.... | ratana | ldap | 999999999 |
|1000  | Rt        | Lm      | ratana@ucsb....   | ratana     | ldap       | 999999999 |
|10001 | Ratana | Lim | ratana@ic.ucsb... | ratana@ic | externaldb | 999999999 |
|10001 | Rt        | Lm      | ratana@ic.ucsb... | ratana@ic   | externaldb | 999999999 |
|10002 | Ratana | Lim | ratana@lsit.ucsb...| ratana@lsit | mnet | |
|10002 | Rt        | Lm      | ratana@lsit.ucsb...| ratana@lsit | mnet       |           |


I am the person that have all the different records in the user table.   
I am the person that have all the different records in the user table.   


Problem #1: I have 3 different accounts in my moodle instance
Problem #1: I have 3 different accounts in my moodle instance
Problem #2: How does an instructor knows which one to enroll me in if it is done manually?
Problem #2: How does an instructor knows which one to enroll me in if it is done manually?


The two main problem ought to be enought to refactor user accounts in the database and the authentication method.  User same person ought to have one user record but allout for diferent authentication method (perhaps including the username).  Also user ought to maintain a primary email or contact methods independent of the database record.
The two main problem ought to be enought to refactor user accounts in the database and the authentication method.  User (the same person) ought to have one user record but allow for diferent authentication methods (perhaps including the username/aliases to authenticate by).  Also user ought to maintain a primary email or contact methods independent of the database account record.
 
There must exists a standard design pattern for account--I cannot seems to locate a good reference on the internet.  DB wise, the user table in Moodle needs to be normalized a bit more to accommendate a standard design that supports one account per real user regardless of authentication methods, emails, etc.

Latest revision as of 22:39, 14 October 2015

USER ACCOUNT DESIGN PROBLEM

Here is the problem I've been battling over the years with Moodule user account design: The same person have multiple accounts on Moodle user table depending on the authentication method. Here is an example.

| id   | firstname | lastname | email              | usrname     | auth       | idnumber  |
|1000  | Rt        | Lm       | ratana@ucsb....    | ratana      | ldap       | 999999999 |
|10001 | Rt        | Lm       | ratana@ic.ucsb...  | ratana@ic   | externaldb | 999999999 |
|10002 | Rt        | Lm       | ratana@lsit.ucsb...| ratana@lsit | mnet       |           |

I am the person that have all the different records in the user table.

Problem #1: I have 3 different accounts in my moodle instance
Problem #2: How does an instructor knows which one to enroll me in if it is done manually?

The two main problem ought to be enought to refactor user accounts in the database and the authentication method. User (the same person) ought to have one user record but allow for diferent authentication methods (perhaps including the username/aliases to authenticate by). Also user ought to maintain a primary email or contact methods independent of the database account record.

There must exists a standard design pattern for account--I cannot seems to locate a good reference on the internet. DB wise, the user table in Moodle needs to be normalized a bit more to accommendate a standard design that supports one account per real user regardless of authentication methods, emails, etc.