How to mention username in Flutter? - flutter

I want to implement the feature mention for flutter. When the user type # and put some username behind it, it will trigger the mention list load from api (This part I already handle), the point is when the user choose the username from list it will autocomplete and replace the # with the username (Username not userid, the username is not unique) and style the text to blue.
I already try this https://pub.dev/packages/flutter_mentions, this package only work for the userid.

Related

Power apps set button visible if user email is the same as requestors email

I have a form request and i want to let someone edit only his own request except from me and my team that we can always edit. So I need to set edit button visible only for my team and the original creator of the form. I used the user.email to get the email of the user who uses the app but I cant use equality netween this variable and the data card value as its incompatible user type. Text with table. How can i get the email in the data card and compare it to the users email?
actually it's quite easy, your requestorEmail should be coming from some datasource like sharepoint record or datavererse or so on.
You can get current record and then it's property requestorEmail convert it to Text using Text function.
you could also try ThisItem.requestorEmail and with text function you can do so.
Ms Docs should help
In addition if you could show/add code for your requestorEmail data card, I can try to provide exact function to extract email. but above info should lead you in correct direciton
I used on change action of the datacard and used set global variable varUserEmail to thisitem.requestoremail . Then i set the button visible if the user email = varUserEmail.Email . So in this way everytime the email changes to the email that is supposed to edit the request the buttons are visible for editing or deleting the report.

Keycloak email custom theme, get user ID

I'm creating a custom theme to emails on keycloak and I need to get the user Id who ask for password reset. I can get the Username, the Firs name etc by user.getUsername(),user.getFirstName() but I can't get the Id. I tried user.getUserId, user.getId, user.getID..but always get an error. Can anybody helps me?
Thanks
Unfortunately, the id is not available out of the box. The user attribute is an instance of ProfileBean. You can only use the properties of that class.
You will need to either find a way to map it into an attribute or write a custom EmailTemplateProvider

How to change multiple fe_user passwords in TYPO3 6.2?

I want to reset the password for 46 fe_users, but when I just update the field "password" I can see the actual password in the columns instead some encoded value...
UPDATE "fe_users" SET PASSWORD="test" WHERE pid=53
I want it to look like the entry above "test".
It makes sense to me that my approach doesn't work but I can't figure out what else I could try...anyone an idea? In the backend records page I only know how to change a password one by one.
Use BE-modul Scheduler (install EXT:scheduler if not already installed).
Select Class Convert user passwords to salted hashes and run this task, once.
Description from this task: Update all frontend and backend user passwords to salted hashes. This task deactivates itself when completed.
You can also do that without any DB hacking. In the List Module you can edit just one field per record of but from many records at the same time. e.g. edit all Name fields or in your case all password fields.
With hundreds of records your of course faster with hacking db + scheduler. But with just 46 I would maybe try the following:
List Module
Go to the sysfolder that is holding your fe_users
Click on the text Website User (46) the page reloads now
Scroll down and tick the checkbox password
Confirm with set fields the page reloads
Now scroll up again to the head of the Website User table and click on the icon beside password the page reloads again
now you can tab -> paste -> tab -> paste the passwords of all users really fast and save at once.
Even if you don't want to do it this way, its always good to in mind that it is possible.
If you change the passwords by chaning the password in the database the password is encrypted after the next login of each user.
if you want to encrypt the passwords after changing you can use the sheduler task to encrypt your passwords like #jokumer wrote.

how to get profile password for the particular particular profile in atg?

I tried to get password for the particular profile, but I'm struggling to do so.
My friends suggested that we can get profile information when we pass profile id. Can any one help me how to do this?
Here is a code snippet of what we've done so far using profileId:
Repository repository = getConnection();
RepositoryView view=repository.getView("user");
RqlStatement stat=RqlStatement.parseRqlStatement("email=?0");
Object param[]={resetEmail};
RepositoryItem[] emailCheck=stat.executeQuery(view, param);
Map profile= new HashMap();
profile.put("userId",profileId);
Please help me get profile information when we pass profile id.
First of all, in ATG the Profile's password is hashed to prevent any malicious attacker from reading it in clear text. Depending on your ATG version it will be hashed in MD5 or SHA-1 plus some salt, so you will NOT be able to see a clear text password.
Second, why do you need to access the password? If you have a specific requirement, such as logging the user in, post it and I will be able to assist.
That said, assuming that you have a valid scenario where you need to access the hashed password, how to do it depends on whether you just need the password of the user that is logged in, or some other user.
For the currently logged in user, you just need to resolve the /atg/userprofiling/Profile component, and do
String password = (String) profile.getPropertyValue("password");
Obviously the "password" string should replaced with a constant or with the Profile propertyManager, depending on your project's coding practices.
If you want to access the password (remember, you can't access the clear text password, only the hashed version of it) of any other user, you need to locate the user first. The /atg/userprofiling/ProfileItemFinder component has tools to help you with these, so you'll have to inject it into whatever component you are writing:
RepositoryItem user = profileItemFinder.findByEmail("your#email.com", "user")[0];
String password = (String) user.getPropertyValue("password");
Hope this helps.
Edit
If all you have is the profile id, you can use the following snippet after injecting the /atg/userprofiling/ProfileTools component:
Profile user = profileTools.findProfile("profile id");
String password = (String) user.getPropertyValue("password");

Ektron user change password?

I have a Ektron client with Ektron installed. They would like to add the functionality to change a password to something they want. Do I need to be concerned with the ektron part or just go ahead and make my edit?
Is there an easy way to do that? Any links to information would be greatly appreciated.
If you're talking about Ektron CMS400 Membership Users, you can use the Web Service Method:
User.ResetMembershipUserPassword
If you're trying to set it for regular CMS400 users, you're out of luck. The administrator will need to reset their password (if they've forgotten it) and the user will need to log back in to the workarea and change their password there.
UPDATE
That method resets the password to a random value. To set the password to a desired value, you'll have to use:
Ektron.Cms.BusinessApi.dll
Ektron.Cms.UserAPI.ResetMembershipUserPassword(string Username,
string oldPassword,
string newPassword)