Password field stores value as 'not cached' in external database authentication in moodle

Password field stores value as 'not cached' in external database authentication in moodle

by Md. Touhidul Islam -
Number of replies: 6

Hi all,

I am working on the Moodle 3.02 version .

I am using External database authentication plugin and provide all the information which are mentioned.

I can login only but having one problem but i can't solve it.

In my database mdl_user.password field is always stores value as "not cached",

I Didn't understand why it is so, i read all the blogs and forums but i don't find any solution .


My external database password field type is: Varchar
and Password format is: plain text  (for moodle authentication with external database)


Did i missed some thing in configurations of External database ??
Expecting a favorable response .

Thanks
Touhid

Average of ratings: -
In reply to Md. Touhidul Islam

Re: Password field stores value as 'not cached' in external database authentication in moodle

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

That simply means that Moodle will not store the user password, it will check it against the external database source each time.

That, I think, is the expected behaviour - it is certainly what happens on my use of external database and that works as expected, so I dont think this is a problem.

In reply to Richard Oelmann

Re: Password field stores value as 'not cached' in external database authentication in moodle

by Md. Touhidul Islam -

Richard,

Thanks for response to me. I m new in moodle and learning.

You are saying that this is a not problem. OK .

But after login into moodle, i  can see that moodle store username,
password filed store: not cached and all others filed are empty.

My external database fileds are as:

SL.No

Field Name

Data Type & Size

 1

ID #

Int(11) Not Null

2

First Name

Varchar(100) Not Null

3

Last Name (Surname)

Varchar(100) Not Null

4

username

Varchar(100) Not Null

5

password

Varchar(30) Not Null

6

Email address

Varchar(100) Not Null

7

City/Town

Varchar(100) Not Null

8

Country

Varchar(100) Not Null

9

Language

Varchar(50) Not Null

10

Web page

Varchar(255) Not Null

11

Institution

Varchar(40) Not Null

12

Department

Varchar(30) Not Null

13

Phone #1

Varchar(20) Not Null

14

Phone #2

Varchar(20) Not Null

15

Address

Varchar(100) Not Null

16

Description

Varchar(255) Not Null


Login into moodle Using username and password from external database its work and its redirect to mydomain/user/edit.php page. But when i edit for some field such as: firstname, surname , email etc and clik on update profile  it shows an following error:

I think you have understand my problem. and expect from to You will give a better solution.

If you need any others inforamtion just inform me.


Waiting for your response.


Thanks

TOUHID


In reply to Md. Touhidul Islam

Re: Password field stores value as 'not cached' in external database authentication in moodle

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

If you want those fields filled in Moodle from your external database, then you need to fill in the data mapping on the external database authentication page

http://yoursite/admin/auth_config.php?auth=db

It's fairly well documented at https://docs.moodle.org/32/en/External_database_authentication

In reply to Richard Oelmann

Re: Password field stores value as 'not cached' in external database authentication in moodle

by Md. Touhidul Islam -

Hi Richard


Thanks again. I have followed your instruction https://docs.moodle.org/32/en/External_database_authentication but moodle database store empty data except username and password (not cached).

My mapping is bellow:



Have i missed something ??

Thanks

In reply to Md. Touhidul Islam

Re: Password field stores value as 'not cached' in external database authentication in moodle

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You stated in an earlier post that your external database contained the following fields (among others):

  • First Name
  • Last Name (Surname)

You appear to have configured the external database authentication plugin  to look for values in the following fields:

  • firstname
  • lastname

Either you need to rename the fields in the external database, so they include the fields 'firstname' (instead of 'First Name') and 'lastname' (instead of 'Last Name (Surname)') OR you need to edit the settings for the authentication plugin to map the fields 'First Name' and 'Last Name (Surname)'.


In reply to Davo Smith

Re: Password field stores value as 'not cached' in external database authentication in moodle

by Md. Touhidul Islam -

Hi Smith


Thanks for reply.

Actually my database filed is: firstname and lastname but wrongly enter First Name and Last Name (Surname) in there. That was my mistake. Sorrryyyy Smith.

Hope you understand.

Waiting for your response to help me.

I have tried but cant solve my problem.


Thanks

TOUHID