How can i change the name in admin magento? - admin

I want to change the name in the admin magento,i'm trying but not ok

Go to your Database search the table- "admin_user" here you can add Admin Username and Password manually by clicking Insert link or you can add by MySQL query- UPDATE admin_user SET password = MD5('NEWPASSWORD') WHERE username = 'ADMINUSERNAME'; . If you forgot the Database name, find from here- /app/etc/local.xml and open the code then search DB here.

First you have to run this Query on your database:
INSERT INTO `core_config_data` (`scope`, `scope_id`, `path`, `value`)
VALUES ('websites', '0', 'dev/debug/template_hints', '1');
This Query will ON the admin path hint.
After this refresh your customer page and check the specific file for titles. Open the file and change the names.

Related

Querying using custom key identifier(Name/ID) in firestore(datastore mode)?

I have a datastore entity like this below
Name/ID Parent Rollen email first_name last_name
name=CidassUID Key(Tenant, 'CidassGroupID') ["user","admin"] user#email.com user first name user last name
I would like to make a query w.r.t Name/ID
In GQL I am trying like this
select * from User where Name/ID='CidassUID'
and in python like this..
query = client.query(kind='User')
query.add_filter('Name/ID', '=', 'name=CidassUID')
return list(query.fetch())
Can somebody help how can I get the result via Name/ID?
Thanks a lot
so thats how i solve it in GQL..
select * from User where __key__= Key(Tenant, 'CidassGroupID', User, 'CidassUID')
and for python..
query_key=client.key('Tenant', 'CidassGroupID','User', 'CidassUID')
query.key_filter(query_key,'=')

Admin Logged In Validation - Front End Opencart

Is there any way to check if the admin is logged in at front-end in Opencart? I would like to show a notice bar with content "Admin Logged In" when I open my store.
To be precise, in the controller of my module, i would like to add:
$data['admin_logged'] = some_function;
and when I echo it in my .tpl to get 1 if admin is logged in or 0 if not.
Actually i got it done by:
// Check if admin is logged in - frontend
$this->user = new User($this->registry);
$data['admin_logged']=($this->user->isLogged())
Now you can use if($admin_logged) /* do stuff here */
Thank you anyway
Yes, you can check it, using the User class:
$data['admin_logged'] = $this->user->isLogged() ? 1 : 0;

Devise trying to save password attribute to database

Running Rails 4.2 and devise 3.4.1
I've added "devise :database_authenticatable", to a User model, and everything works exactly as expected .... except, when the record is saved or created I get this error:
Mysql2::Error: Unknown column 'password' in 'field list': UPDATE users SET password = NULL, .....
The devise attribute/method 'password' is clearly being added to the sql but is not a column within the table.
I'm stumped ... Any ideas?
Please check your migration file if there is a encrypted_password field. Next check the structure of users table in database. There should be encrypted_password column too. You can also override devise views and see what happen inside form and try to debug it with console help.

Password Field Length Django

I have written a custom hasher for the passwords and it returns a hashed password length of 148. But Django seems to limit the length of the password in the SQL table to 128 by default. How do I change it?
The correct way would be to use a custom user model that overrides the password field:
https://docs.djangoproject.com/en/dev/topics/auth/customizing/#specifying-a-custom-user-model for details.
As an alternative workaround, you can use a third party applicaton called django-primate: https://github.com/aino/django-primate#alternative-password-hashing

how to verify email through link in rails4 application

How to verify email through link.
I have user edit profile and it is showing user email.I want to give one link to verify email.I do not what to do.
Add one column to your
User Model : email_verification and by default set to zero (0).
Then using persistence_token create a URL and sent to that specific email address. If you dnt have persistence_token as column in your User model then you can add custom column of your choice like verify_email_token as column name and stored 50 random string.
Using
o = [('a'..'z'),('A'..'Z'),('0'..'9')].map{|i| i.to_a}.flatten
string = (0...50).map{ o[rand(o.length)] }.join
URL example :
http://www.yoursitename.com/VerifyEmailAddress/?token=persistence_token ;
When user click on that link, internally call function like VerifyEmailAddress and in that method update email_verification column by one (1).